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.0.0 to 1.0.1

2

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

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

@@ -23,4 +23,28 @@ proback.js - dependency-free very minimal helper for APIs with Promise/callback dual design

```javascript
var Proback = require('proback.js');
...
assigner.assign( obj1, obj2[, obj3[, respect]] );
new Promise( function (resolve, reject) {
//some callback is needed?
object.fnCallWithCallback( data, Proback.handler( null, resolve, reject ) )
}).then( function (res) {
expect(res).to.equal('Done.')
done()
})
```
```javascript
var Proback = require('proback.js');
...
new Promise( function (resolve, reject) {
//some callback is needed?
object.fnCallWithCallback( data, function (err, res) {
if (err) return Proback.rejecter(err, null, reject)
// some operation
return Proback.resolver(res, null, resolve)
} )
}).then( function (res) {
expect(res).to.equal('Done.')
done()
})
```
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