Comparing version 2.0.0 to 3.0.0
var Promise = require('native-or-bluebird') | ||
var assert = require('assert') | ||
module.exports = thenify | ||
function thenify(name, $$__fn__$$) { | ||
if (typeof name === 'function') { | ||
$$__fn__$$ = name | ||
name = $$__fn__$$.name || 'anonymous' | ||
} | ||
function thenify($$__fn__$$) { | ||
assert(typeof $$__fn__$$ === 'function') | ||
var name = $$__fn__$$.name || '' | ||
return eval('(function ' + name + '() {\n' | ||
@@ -12,0 +11,0 @@ + 'var self = this\n' |
{ | ||
"name": "thenify", | ||
"description": "Promisify a callback-based function", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -31,7 +31,5 @@ | ||
### var fn = thenify([name], fn) | ||
### var fn = thenify(fn) | ||
Promisifies a function. | ||
Optionally set a custom name to the function, | ||
defaulting to `fn.name`. | ||
@@ -38,0 +36,0 @@ [gitter-image]: https://badges.gitter.im/thenables/thenify.png |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4828
28
53