UNPKG

433 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = find;
7/**
8 * Copyright (c) 2015-present, Facebook, Inc.
9 *
10 * This source code is licensed under the MIT license found in the
11 * LICENSE file in the root directory of this source tree.
12 *
13 *
14 */
15
16function find(list, predicate) {
17 for (var i = 0; i < list.length; i++) {
18 if (predicate(list[i])) {
19 return list[i];
20 }
21 }
22}
\No newline at end of file