From de98e0b232509d5f40c135d540a70e415272ff85 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 3 May 2017 15:35:00 +0200 Subject: node_modules --- node_modules/core-js/modules/js.array.statics.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 node_modules/core-js/modules/js.array.statics.js (limited to 'node_modules/core-js/modules/js.array.statics.js') diff --git a/node_modules/core-js/modules/js.array.statics.js b/node_modules/core-js/modules/js.array.statics.js new file mode 100644 index 000000000..9536c2e48 --- /dev/null +++ b/node_modules/core-js/modules/js.array.statics.js @@ -0,0 +1,17 @@ +// JavaScript 1.6 / Strawman array statics shim +var $ = require('./$') + , $export = require('./$.export') + , $ctx = require('./$.ctx') + , $Array = require('./$.core').Array || Array + , statics = {}; +var setStatics = function(keys, length){ + $.each.call(keys.split(','), function(key){ + if(length == undefined && key in $Array)statics[key] = $Array[key]; + else if(key in [])statics[key] = $ctx(Function.call, [][key], length); + }); +}; +setStatics('pop,reverse,shift,keys,values,entries', 1); +setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3); +setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' + + 'reduce,reduceRight,copyWithin,fill'); +$export($export.S, 'Array', statics); \ No newline at end of file -- cgit v1.2.3