diff options
Diffstat (limited to 'node_modules/babel-runtime/node_modules/core-js/modules/es6.array.slice.js')
-rw-r--r-- | node_modules/babel-runtime/node_modules/core-js/modules/es6.array.slice.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/node_modules/babel-runtime/node_modules/core-js/modules/es6.array.slice.js b/node_modules/babel-runtime/node_modules/core-js/modules/es6.array.slice.js deleted file mode 100644 index bdd496ecb..000000000 --- a/node_modules/babel-runtime/node_modules/core-js/modules/es6.array.slice.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; -var $export = require('./_export'); -var html = require('./_html'); -var cof = require('./_cof'); -var toAbsoluteIndex = require('./_to-absolute-index'); -var toLength = require('./_to-length'); -var arraySlice = [].slice; - -// fallback for not array-like ES3 strings and DOM objects -$export($export.P + $export.F * require('./_fails')(function () { - if (html) arraySlice.call(html); -}), 'Array', { - slice: function slice(begin, end) { - var len = toLength(this.length); - var klass = cof(this); - end = end === undefined ? len : end; - if (klass == 'Array') return arraySlice.call(this, begin, end); - var start = toAbsoluteIndex(begin, len); - var upTo = toAbsoluteIndex(end, len); - var size = toLength(upTo - start); - var cloned = new Array(size); - var i = 0; - for (; i < size; i++) cloned[i] = klass == 'String' - ? this.charAt(start + i) - : this[start + i]; - return cloned; - } -}); |