52a3479038064c7272e98ee26c2d48ec.json 2.6 KB

1
  1. {"ast":null,"code":"var isObject = require('../internals/is-object');\n\nvar isArray = require('../internals/is-array');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species'); // `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\n\nmodule.exports = function (originalArray, length) {\n var C;\n\n if (isArray(originalArray)) {\n C = originalArray.constructor; // cross-realm fallback\n\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n }\n\n return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};","map":{"version":3,"sources":["/Users/jane/Documents/Курс Front-end/HW8/myproject/node_modules/core-js-pure/internals/array-species-create.js"],"names":["isObject","require","isArray","wellKnownSymbol","SPECIES","module","exports","originalArray","length","C","constructor","Array","prototype","undefined"],"mappings":"AAAA,IAAIA,QAAQ,GAAGC,OAAO,CAAC,wBAAD,CAAtB;;AACA,IAAIC,OAAO,GAAGD,OAAO,CAAC,uBAAD,CAArB;;AACA,IAAIE,eAAe,GAAGF,OAAO,CAAC,gCAAD,CAA7B;;AAEA,IAAIG,OAAO,GAAGD,eAAe,CAAC,SAAD,CAA7B,C,CAEA;AACA;;AACAE,MAAM,CAACC,OAAP,GAAiB,UAAUC,aAAV,EAAyBC,MAAzB,EAAiC;AAChD,MAAIC,CAAJ;;AACA,MAAIP,OAAO,CAACK,aAAD,CAAX,EAA4B;AAC1BE,IAAAA,CAAC,GAAGF,aAAa,CAACG,WAAlB,CAD0B,CAE1B;;AACA,QAAI,OAAOD,CAAP,IAAY,UAAZ,KAA2BA,CAAC,KAAKE,KAAN,IAAeT,OAAO,CAACO,CAAC,CAACG,SAAH,CAAjD,CAAJ,EAAqEH,CAAC,GAAGI,SAAJ,CAArE,KACK,IAAIb,QAAQ,CAACS,CAAD,CAAZ,EAAiB;AACpBA,MAAAA,CAAC,GAAGA,CAAC,CAACL,OAAD,CAAL;AACA,UAAIK,CAAC,KAAK,IAAV,EAAgBA,CAAC,GAAGI,SAAJ;AACjB;AACF;;AAAC,SAAO,KAAKJ,CAAC,KAAKI,SAAN,GAAkBF,KAAlB,GAA0BF,CAA/B,EAAkCD,MAAM,KAAK,CAAX,GAAe,CAAf,GAAmBA,MAArD,CAAP;AACH,CAXD","sourcesContent":["var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n"]},"metadata":{},"sourceType":"script"}