New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mod-cons

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mod-cons - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

lib/resolver.js

19

index.js

@@ -1,8 +0,17 @@

var ninvoke = require('./lib/ninvoke');
var nfcall = require('./lib/nfcall');
var ninvoke = require('./ninvoke');
var npost = require('./npost');
var nfcall = require('./nfcall');
var nfapply = require('./nfapply');
var nfbind = require('./nfbind');
var nbind = require('./nbind');
module.exports = {
nsend : ninvoke,
ninvoke : ninvoke,
nfcall : nfcall
nsend : ninvoke,
ninvoke : ninvoke,
npost : npost,
nfcall : nfcall,
nfapply : nfapply,
nfbind : nfbind,
denodeify : nfbind,
nbind : nbind
};

@@ -0,1 +1,2 @@

var resolver = require('./resolver');

@@ -5,15 +6,5 @@ module.exports = function invoke(obj, fn) {

return new Promise(function (resolve, reject) {
args.push(function (err) {
if (err) {
reject(err);
} else {
resolve.apply(undefined, Array.prototype.slice.call(arguments, 1));
}
});
try {
obj[fn].apply(obj, args);
} catch (err) {
reject(err);
}
args.push(resolver(obj, resolve, reject));
obj[fn].apply(obj, args);
});
};
{
"name": "mod-cons",
"version": "0.0.4",
"version": "0.0.5",
"description": "Modern conveniences for native JavaScript promises.",
"main": "index.js",
"scripts": {
"test": "mocha"
"test": "mocha",
"prepublish": "npm test && eslint ."
},

@@ -9,0 +10,0 @@ "repository": {

@@ -1,8 +0,31 @@

convenient
mod-cons
===========
![Build Status](https://img.shields.io/travis/ttab/convenient.svg)
![Version](https://img.shields.io/npm/v/convenient.svg)
![Licens](https://img.shields.io/npm/l/convenient.svg)
![Build Status](https://img.shields.io/travis/ttab/mod-cons.svg)
![Version](https://img.shields.io/npm/v/mod-cons.svg)
![Licens](https://img.shields.io/npm/l/mod-cons.svg)
Modern conveniences for native JavaScript promises.
Modern conveniences for native JavaScript promises.
Have you switched to native promises but miss the convenience of
`Q.nfcall`? This library contains a low-footprint reimplementations of
[Q] convenience functions meant to be run on top of native ES5
promises.
No messy dependencies. No half-baked home-rolled Promise
implementation. No wrappers.
- [ninvoke / nsend][ninvoke]
- [nfcall]
- [nfapply]
- [nfbind / denodeify][nfbind]
- [nbind]
- [npost / nmapply][npost]
[Q]:https://github.com/kriskowal/q/
[ninvoke]:https://github.com/kriskowal/q/wiki/API-Reference#qninvokeobject-methodname-args
[nfcall]:https://github.com/kriskowal/q/wiki/API-Reference#qnfcallfunc-args
[nfapply]:https://github.com/kriskowal/q/wiki/API-Reference#qnfapplynodefunc-args
[nfbind]:https://github.com/kriskowal/q/wiki/API-Reference#qnfbindnodefunc-args
[npost]:https://github.com/kriskowal/q/wiki/API-Reference#qnpostobject-methodname-args
[nbind]:https://github.com/kriskowal/q/wiki/API-Reference#qnbindnodemethod-thisarg-args
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