aboutsummaryrefslogtreecommitdiff
path: root/node_modules/regenerator-runtime
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-24 15:10:37 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-24 15:11:17 +0200
commit7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch)
tree70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/regenerator-runtime
parentaca1143cb9eed16cf37f04e475e4257418dd18ac (diff)
downloadwallet-core-7a3df06eb573d36142bd1a8e03c5ce8752d300b3.tar.xz
fix build issues and add typedoc
Diffstat (limited to 'node_modules/regenerator-runtime')
-rw-r--r--node_modules/regenerator-runtime/package.json2
-rw-r--r--node_modules/regenerator-runtime/runtime.js17
2 files changed, 16 insertions, 3 deletions
diff --git a/node_modules/regenerator-runtime/package.json b/node_modules/regenerator-runtime/package.json
index 55f13af56..d73b946d2 100644
--- a/node_modules/regenerator-runtime/package.json
+++ b/node_modules/regenerator-runtime/package.json
@@ -2,7 +2,7 @@
"name": "regenerator-runtime",
"author": "Ben Newman <bn@cs.stanford.edu>",
"description": "Runtime for Regenerator-compiled generator and async functions.",
- "version": "0.10.3",
+ "version": "0.10.5",
"main": "runtime-module.js",
"keywords": [
"regenerator",
diff --git a/node_modules/regenerator-runtime/runtime.js b/node_modules/regenerator-runtime/runtime.js
index 212da1bc1..5b08c4d34 100644
--- a/node_modules/regenerator-runtime/runtime.js
+++ b/node_modules/regenerator-runtime/runtime.js
@@ -16,6 +16,7 @@
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
var inModule = typeof module === "object";
@@ -189,8 +190,8 @@
}
}
- if (typeof process === "object" && process.domain) {
- invoke = process.domain.bind(invoke);
+ if (typeof global.process === "object" && global.process.domain) {
+ invoke = global.process.domain.bind(invoke);
}
var previousPromise;
@@ -229,6 +230,9 @@
}
defineIteratorMethods(AsyncIterator.prototype);
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
+ return this;
+ };
runtime.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
@@ -412,6 +416,15 @@
Gp[toStringTagSymbol] = "Generator";
+ // A Generator should always return itself as the iterator object when the
+ // @@iterator function is called on it. Some browsers' implementations of the
+ // iterator prototype chain incorrectly implement this, causing the Generator
+ // object to not be returned from this call. This ensures that doesn't happen.
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
+ Gp[iteratorSymbol] = function() {
+ return this;
+ };
+
Gp.toString = function() {
return "[object Generator]";
};