Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make `suspend()` an actual alias for `suspend.async()`, instead of wr…

…apping it
  • Loading branch information...
commit f0471e2c28e6a5224555d7f9ae0cf78701d8c7b1 1 parent 078eb2e
@jmar777 authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/suspend.js
View
8 lib/suspend.js
@@ -1,8 +1,4 @@
-var suspend = module.exports = function suspend(generator) {
- return suspend.async.call(this, generator);
-};
-
-suspend.async = function async(generator) {
+var suspend = module.exports = function async(generator) {
if (!isGeneratorFunction(generator)) {
throw new Error('First .async() argument must be a GeneratorFunction.');
}
@@ -22,6 +18,8 @@ suspend.async = function async(generator) {
};
};
+suspend.async = suspend;
+
suspend.run = function run(generator, callback) {
if (!isGeneratorFunction(generator)) {
throw new Error('First .run() argument must be a GeneratorFunction.');
Please sign in to comment.
Something went wrong with that request. Please try again.