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

proback.js

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proback.js - npm Package Compare versions

Comparing version 1.2.1 to 1.5.0

test/Promises.js

19

lib/Proback.js
module.exports = {
quicker: function ( res, callback ) {
return new Promise( (resolve, reject) => {
if (callback) callback( null, res )
resolve(res)
} )
},
forAll: function ( promises, callback ) {
return new Promise( (resolve, reject) => {
Promise.all( promises )
.then( (res) => {
if (callback) callback(null, res)
resolve( res )
} )
.catch( (reason) => {
if (callback) callback(reason)
reject( reason )
} )
} )
},
handler: function ( callback, resolve, reject ) {

@@ -3,0 +22,0 @@ return function (err, res) {

2

package.json
{
"name": "proback.js",
"version": "1.2.1",
"version": "1.5.0",
"description": "Tiny libary to aid Promise/Callback dual API design",

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

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