Socket
Socket
Sign inDemoInstall

universalify

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.2.0

6

index.js

@@ -23,4 +23,8 @@ 'use strict'

if (typeof cb !== 'function') return fn.apply(this, arguments)
else fn.apply(this, arguments).then(r => cb(null, r), cb)
else {
delete arguments[arguments.length - 1]
arguments.length--
fn.apply(this, arguments).then(r => cb(null, r), cb)
}
}, 'name', { value: fn.name })
}

2

package.json
{
"name": "universalify",
"version": "0.1.2",
"version": "0.2.0",
"description": "Make a callback- or promise-based function support both promises and callbacks.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -24,3 +24,3 @@ # universalify

Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with more than three arguments, and does not ensure that the callback is only called once.
Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with three or more arguments, and does not ensure that the callback is only called once.

@@ -27,0 +27,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