1 line
6.8 KiB
JSON
1 line
6.8 KiB
JSON
{"ast":null,"code":"'use strict';\n\nvar bind = require('../internals/function-bind-context');\n\nvar call = require('../internals/function-call');\n\nvar toObject = require('../internals/to-object');\n\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\n\nvar isConstructor = require('../internals/is-constructor');\n\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\nvar createProperty = require('../internals/create-property');\n\nvar getIterator = require('../internals/get-iterator');\n\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar $Array = Array; // `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\n\nmodule.exports = function from(arrayLike\n/* , mapfn = undefined, thisArg = undefined */\n) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value; // if the target is not iterable or it's an array with the default iterator - use a simple case\n\n if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n\n for (; !(step = call(next, iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = lengthOfArrayLike(O);\n result = IS_CONSTRUCTOR ? new this(length) : $Array(length);\n\n for (; length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n\n result.length = index;\n return result;\n};","map":{"version":3,"names":["bind","require","call","toObject","callWithSafeIterationClosing","isArrayIteratorMethod","isConstructor","lengthOfArrayLike","createProperty","getIterator","getIteratorMethod","$Array","Array","module","exports","from","arrayLike","O","IS_CONSTRUCTOR","argumentsLength","arguments","length","mapfn","undefined","mapping","iteratorMethod","index","result","step","iterator","next","value","done"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/core-js/internals/array-from.js"],"sourcesContent":["'use strict';\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar $Array = Array;\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n for (;!(step = call(next, iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = lengthOfArrayLike(O);\n result = IS_CONSTRUCTOR ? new this(length) : $Array(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length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