Socket
Socket
Sign inDemoInstall

wrap-fn

Package Overview
Dependencies
75
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

4

component.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc