This reverts commit e556943cec8eb33881534f70c546a2f9e5321407.
@@ -7,15 +7,7 @@
* @return {*}
*/
export function find (list, f) {
- const { length } = list
- let index = 0
- let value
- while (++index < length) {
- value = list[index]
- if (f(value, index, list)) {
- return value
- }
+ return list.filter(f)[0]
}
/**