Socket
Socket
Sign inDemoInstall

thenify

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thenify - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

9

index.js
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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc