swc/crates/swc_bundler/tests/.cache/deno/4574739cf95aae7e28811fe54088d62720e1f4c5.ts

15 lines
390 B
TypeScript
Raw Normal View History

// Loaded from https://deno.land/x/graphql_deno@v15.0.0/lib/polyfills/find.js
/* eslint-disable no-redeclare */
// $FlowFixMe
const find = Array.prototype.find ? function (list, predicate) {
return Array.prototype.find.call(list, predicate);
} : function (list, predicate) {
for (const value of list) {
if (predicate(value)) {
return value;
}
}
};
export default find;