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

bluebird2

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

bluebird2 - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

5

changelog.md

@@ -14,1 +14,6 @@ # Changelog

* `clone` method
## 1.2.0
* `version` property
* README typo

39

lib/index.js

@@ -1,20 +0,35 @@

// --------------------
// bluebird2 module
// --------------------
/*
* bluebird2 module
* Exports Bluebird promise library v2.x
*/
// load bluebird
var Bluebird = require('bluebird'),
makeBluebird = require('bluebird/js/main/promise');
makeBluebird = require('bluebird/js/main/promise'),
bluebirdVersion = require('bluebird/package.json').version;
// export Bluebird
module.exports = Bluebird;
/*
* clone method
* Returns a new independent instance of Bluebird
*
* @returns {Function} Bluebird - new Bluebird instance
*/
var clone = function() {
return addProperties(makeBluebird());
};
// add clone method
// returns a new instance of Bluebird
var clone = function() {
var Bluebird = makeBluebird();
/*
* addProperties function
* Adds `clone` method and `version` property to Bluebird
*
* @param {Function} Bluebird - Bluebird instance
* @returns {Function} Bluebird - same Bluebird instance
*/
function addProperties(Bluebird) {
Bluebird.clone = clone;
if (!Bluebird.version) Bluebird.version = bluebirdVersion;
return Bluebird;
};
}
Bluebird.clone = clone;
// export Bluebird with added properties
module.exports = addProperties(Bluebird);
{
"name": "bluebird2",
"version": "1.1.1",
"version": "1.2.0",
"description": "bluebird v2.x",

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

@@ -34,3 +34,3 @@ # bluebird2.js

```js
var Bluebird = require('bluebird3');
var Bluebird = require('bluebird2');
var BluebirdX = Bluebird.clone();

@@ -41,2 +41,11 @@

### `Bluebird.version`
The module adds `.version` property to the Bluebird constructor, containing the semver version of Bluebird.
```js
var Bluebird = require('bluebird2');
console.log(Bluebird.version); // e.g. '2.10.2'
```
## Tests

@@ -43,0 +52,0 @@

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