Bump eslint-plugin-import to avoid vulnerability in dependency
This commit is contained in:
parent
10695e6a20
commit
ed9506bbaf
1660 changed files with 67726 additions and 27926 deletions
6
node_modules/es-abstract/helpers/getIteratorMethod.js
generated
vendored
6
node_modules/es-abstract/helpers/getIteratorMethod.js
generated
vendored
|
|
@ -3,9 +3,11 @@
|
|||
var hasSymbols = require('has-symbols')();
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBound = require('call-bind/callBound');
|
||||
var isString = require('is-string');
|
||||
|
||||
var $iterator = GetIntrinsic('%Symbol.iterator%', true);
|
||||
var $stringSlice = callBound('String.prototype.slice');
|
||||
var $String = GetIntrinsic('%String%', true);
|
||||
|
||||
module.exports = function getIteratorMethod(ES, iterable) {
|
||||
var usingIterator;
|
||||
|
|
@ -25,12 +27,12 @@ module.exports = function getIteratorMethod(ES, iterable) {
|
|||
}
|
||||
};
|
||||
};
|
||||
} else if (ES.Type(iterable) === 'String') {
|
||||
} else if (isString(iterable)) {
|
||||
usingIterator = function () {
|
||||
var i = 0;
|
||||
return {
|
||||
next: function () {
|
||||
var nextIndex = ES.AdvanceStringIndex(iterable, i, true);
|
||||
var nextIndex = ES.AdvanceStringIndex($String(iterable), i, true);
|
||||
var value = $stringSlice(iterable, i, nextIndex);
|
||||
i = nextIndex;
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue