Closed jgermade closed 7 years ago
Hi!
Regarding de definition of Ponyfill, does it include the use of the native function if exists?
Example ( find.js ):
module.exports = Array.prototype.find ? function (list, iteratee, this_arg) { return list.find(iteratee, this_arg); } : function (list, iteratee, this_arg) { for( var i = 0, n = list.length ; i < n ; i++ ) { if( iteratee.call(this_arg, list[i], i) ) return list[i]; } };
From the readme:
Ponyfills should never use the native API, even if available, as it might have slightly different behavior between environments, which can cause bugs.
:)
Hi!
Regarding de definition of Ponyfill, does it include the use of the native function if exists?
Example ( find.js ):