0d878fc44c0968361227bb3ea9e664aa.json 3.6 KB

1
  1. {"ast":null,"code":"'use strict';\n\nvar charAt = require('../internals/string-multibyte').charAt;\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\n\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n }); // `%StringIteratorPrototype%.next` method\n // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return {\n value: undefined,\n done: true\n };\n point = charAt(string, index);\n state.index += point.length;\n return {\n value: point,\n done: false\n };\n});","map":{"version":3,"sources":["/Users/jane/Documents/Курс Front-end/HW8/myproject/node_modules/core-js-pure/modules/es.string.iterator.js"],"names":["charAt","require","InternalStateModule","defineIterator","STRING_ITERATOR","setInternalState","set","getInternalState","getterFor","String","iterated","type","string","index","next","state","point","length","value","undefined","done"],"mappings":"AAAA;;AACA,IAAIA,MAAM,GAAGC,OAAO,CAAC,+BAAD,CAAP,CAAyCD,MAAtD;;AACA,IAAIE,mBAAmB,GAAGD,OAAO,CAAC,6BAAD,CAAjC;;AACA,IAAIE,cAAc,GAAGF,OAAO,CAAC,8BAAD,CAA5B;;AAEA,IAAIG,eAAe,GAAG,iBAAtB;AACA,IAAIC,gBAAgB,GAAGH,mBAAmB,CAACI,GAA3C;AACA,IAAIC,gBAAgB,GAAGL,mBAAmB,CAACM,SAApB,CAA8BJ,eAA9B,CAAvB,C,CAEA;AACA;;AACAD,cAAc,CAACM,MAAD,EAAS,QAAT,EAAmB,UAAUC,QAAV,EAAoB;AACnDL,EAAAA,gBAAgB,CAAC,IAAD,EAAO;AACrBM,IAAAA,IAAI,EAAEP,eADe;AAErBQ,IAAAA,MAAM,EAAEH,MAAM,CAACC,QAAD,CAFO;AAGrBG,IAAAA,KAAK,EAAE;AAHc,GAAP,CAAhB,CADmD,CAMrD;AACA;AACC,CARa,EAQX,SAASC,IAAT,GAAgB;AACjB,MAAIC,KAAK,GAAGR,gBAAgB,CAAC,IAAD,CAA5B;AACA,MAAIK,MAAM,GAAGG,KAAK,CAACH,MAAnB;AACA,MAAIC,KAAK,GAAGE,KAAK,CAACF,KAAlB;AACA,MAAIG,KAAJ;AACA,MAAIH,KAAK,IAAID,MAAM,CAACK,MAApB,EAA4B,OAAO;AAAEC,IAAAA,KAAK,EAAEC,SAAT;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAAP;AAC5BJ,EAAAA,KAAK,GAAGhB,MAAM,CAACY,MAAD,EAASC,KAAT,CAAd;AACAE,EAAAA,KAAK,CAACF,KAAN,IAAeG,KAAK,CAACC,MAArB;AACA,SAAO;AAAEC,IAAAA,KAAK,EAAEF,KAAT;AAAgBI,IAAAA,IAAI,EAAE;AAAtB,GAAP;AACD,CAjBa,CAAd","sourcesContent":["'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n"]},"metadata":{},"sourceType":"script"}