DIR: /proc/1784574/task/1784574/root/usr/share/nodejs/array.prototype.find/ |
Current File : //proc/1784574/task/1784574/root/usr/share/nodejs/array.prototype.find/polyfill.js |
'use strict'; module.exports = function getPolyfill() { // Detect if an implementation exists // Detect early implementations which skipped holes in sparse arrays // eslint-disable-next-line no-sparse-arrays var implemented = Array.prototype.find && [, 1].find(function () { return true; }) !== 1; // eslint-disable-next-line global-require return implemented ? Array.prototype.find : require('./implementation'); }; |