Permalink
Browse files

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

…apping it
  • Loading branch information...
jmar777 committed Dec 2, 2013
1 parent 078eb2e commit f0471e2c28e6a5224555d7f9ae0cf78701d8c7b1
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/suspend.js
View
@@ -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.');

0 comments on commit f0471e2

Please sign in to comment.