Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

universalify

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universalify - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

12

index.js

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

return new Promise((resolve, reject) => {
fn.call(
this,
...args,
(err, res) => (err != null) ? reject(err) : resolve(res)
)
args.push((err, res) => (err != null) ? reject(err) : resolve(res))
fn.apply(this, args)
})

@@ -23,4 +20,7 @@ }

if (typeof cb !== 'function') return fn.apply(this, args)
else fn.apply(this, args.slice(0, -1)).then(r => cb(null, r), cb)
else {
args.pop()
fn.apply(this, args).then(r => cb(null, r), cb)
}
}, 'name', { value: fn.name })
}
{
"name": "universalify",
"version": "2.0.0",
"version": "2.0.1",
"description": "Make a callback- or promise-based function support both promises and callbacks.",

@@ -22,3 +22,3 @@ "keywords": [

"scripts": {
"test": "standard && nyc tape test/*.js | colortape"
"test": "standard && nyc --reporter text --reporter lcovonly tape test/*.js | colortape"
},

@@ -25,0 +25,0 @@ "devDependencies": {

# universalify
[![Travis branch](https://img.shields.io/travis/RyanZim/universalify/master.svg)](https://travis-ci.org/RyanZim/universalify)
![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/RyanZim/universalify/ci.yml?branch=master)
![Coveralls github branch](https://img.shields.io/coveralls/github/RyanZim/universalify/master.svg)

@@ -5,0 +5,0 @@ ![npm](https://img.shields.io/npm/dm/universalify.svg)

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