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

bluebird-ff

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bluebird-ff - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

15

lib/fns.js

@@ -31,8 +31,19 @@ var util = require('util');

arg = [arg];
arg.__ff_and_sig = true;
Object.defineProperty(arg, '__ff_and_sig', {
configurable: false,
writable: false,
enumerable: false,
value: true
});
}
return Promise.all(arg.concat([fn.apply(this, arg)]));
return Promise.resolve(fn.apply(this, arg))
.then(function(result) {
arg.push(result);
return arg;
});
};
}

2

package.json
{
"name": "bluebird-ff",
"version": "1.0.1",
"version": "1.0.2",
"description": "Functional/Control-Flow utilities for Bluebird",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -18,3 +18,20 @@ var chai = require('chai');

});
it('should not append the result if the previous result was not created by and', function() {
var promise = Promise.resolve(['123'])
.and(function(value) {
expect(value).to.eql(['123']);
return ['456'];
})
.and(function(value, value2) {
expect(value).to.eql(['123']);
expect(value2).to.eql(['456']);
return 'abc';
});
return expect(promise).to.eventually.eql([['123'], ['456'], 'abc']);
});
});
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