MCPcopy Create free account
hub / github.com/angular/dev-infra / next

Method next

github-actions/saucelabs/set-saucelabs-env.js:4654–4687  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4652 __privateAdd(this, _target, void 0);
4653 /** @type {'key' | 'value' | 'key+value'} */
4654 __privateAdd(this, _kind, void 0);
4655 /** @type {number} */
4656 __privateAdd(this, _index, void 0);
4657 __privateSet(this, _target, target);
4658 __privateSet(this, _kind, kind);
4659 __privateSet(this, _index, 0);
4660 }
4661 next() {
4662 if (typeof this !== "object" || this === null || !__privateIn(_target, this)) {
4663 throw new TypeError(
4664 `'next' called on an object that does not implement interface ${name} Iterator.`
4665 );
4666 }
4667 const index = __privateGet(this, _index);
4668 const values = __privateGet(this, _target)[kInternalIterator];
4669 const len = values.length;
4670 if (index >= len) {
4671 return {
4672 value: void 0,
4673 done: true
4674 };
4675 }
4676 const { [keyIndex]: key, [valueIndex]: value } = values[index];
4677 __privateSet(this, _index, index + 1);
4678 let result;
4679 switch (__privateGet(this, _kind)) {
4680 case "key":
4681 result = key;
4682 break;
4683 case "value":
4684 result = value;
4685 break;
4686 case "key+value":
4687 result = [key, value];
4688 break;
4689 }
4690 return {

Callers 15

asCallableMethod · 0.45
constructorMethod · 0.45
fulfilledFunction · 0.45
__asyncFunction · 0.45
pullFunction · 0.45
setMethod · 0.45
""Function · 0.45
writeIterableFunction · 0.45
getResponseFunction · 0.45
toSortedArrayMethod · 0.45
httpNetworkFetchFunction · 0.45

Calls 3

__privateInFunction · 0.70
__privateGetFunction · 0.70
__privateSetFunction · 0.70

Tested by

no test coverage detected