regenerator-runtime
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -5,3 +5,3 @@ { | ||
"description": "Runtime for Regenerator-compiled generator and async functions.", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"main": "runtime-module.js", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
@@ -14,3 +14,4 @@ /** | ||
var hasOwn = Object.prototype.hasOwnProperty; | ||
var Op = Object.prototype; | ||
var hasOwn = Op.hasOwnProperty; | ||
var undefined; // More compressible than void 0. | ||
@@ -87,6 +88,25 @@ var $Symbol = typeof Symbol === "function" ? Symbol : {}; | ||
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; | ||
// This is a polyfill for %IteratorPrototype% for environments that | ||
// don't natively support it. | ||
var IteratorPrototype = {}; | ||
IteratorPrototype[iteratorSymbol] = function () { | ||
return this; | ||
}; | ||
var getProto = Object.getPrototypeOf; | ||
var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); | ||
if (NativeIteratorPrototype && | ||
NativeIteratorPrototype !== Op && | ||
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { | ||
// This environment has a native %IteratorPrototype%; use it instead | ||
// of the polyfill. | ||
IteratorPrototype = NativeIteratorPrototype; | ||
} | ||
var Gp = GeneratorFunctionPrototype.prototype = | ||
Generator.prototype = Object.create(IteratorPrototype); | ||
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; | ||
GeneratorFunctionPrototype.constructor = GeneratorFunction; | ||
GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; | ||
GeneratorFunctionPrototype[toStringTagSymbol] = | ||
GeneratorFunction.displayName = "GeneratorFunction"; | ||
@@ -375,6 +395,2 @@ // Helper for defining the .next, .throw, and .return methods of the | ||
Gp[iteratorSymbol] = function() { | ||
return this; | ||
}; | ||
Gp[toStringTagSymbol] = "Generator"; | ||
@@ -381,0 +397,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24833
615