MCPcopy Create free account
hub / github.com/microsoft/SandDance / defineIteratorMethods

Function defineIteratorMethods

docs/app/js/sanddance-app.js:53241–53251  ·  view source on GitHub ↗
(prototype)

Source from the content-addressed store, hash-verified

53239 NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
53240 var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
53241 function defineIteratorMethods(prototype) {
53242 [
53243 "next",
53244 "throw",
53245 "return"
53246 ].forEach(function(method) {
53247 define(prototype, method, function(arg) {
53248 return this._invoke(method, arg);
53249 });
53250 });
53251 }
53252 function AsyncIterator(generator, PromiseImpl) {
53253 function invoke(method, arg, resolve, reject) {
53254 var record = tryCatch(generator[method], generator, arg);

Callers 1

_regeneratorRuntimeFunction · 0.70

Calls 2

defineFunction · 0.70
forEachMethod · 0.45

Tested by

no test coverage detected