wrap-fn
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "wrap-fn", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "support sync, async, and generator functions", | ||
@@ -12,2 +12,2 @@ "dependencies": { | ||
} | ||
} | ||
} |
0.0.2 / 2014-08-31 | ||
================== | ||
* use return value on sync functions | ||
0.0.1 / 2010-01-03 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -44,3 +44,3 @@ /** | ||
var ret = fn.apply(ctx, args); | ||
ret instanceof Error ? done(ret) : done(); | ||
ret instanceof Error ? done(ret) : done(null, ret); | ||
} | ||
@@ -47,0 +47,0 @@ } |
{ | ||
"name": "wrap-fn", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "support sync, async, and generator functions", | ||
@@ -27,2 +27,2 @@ "keywords": [ | ||
"main": "index" | ||
} | ||
} |
@@ -37,7 +37,7 @@ | ||
### `wrap(fn, [done])` | ||
### `wrap(fn, [done])([args, ...])` | ||
Wrap `fn` to support sync, async and generator functions. Call `done` when finished. | ||
`wrap` returns a functio which you can pass arguments to or set the context. | ||
`wrap` returns a function which you can pass arguments to or set the context. | ||
@@ -44,0 +44,0 @@ ```js |
75019
1504