bluebird
Advanced tools
Comparing version 2.9.31 to 2.9.32
"use strict"; | ||
var util = require("./util.js"); | ||
var isPrimitive = util.isPrimitive; | ||
var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver; | ||
@@ -35,3 +34,3 @@ module.exports = function(Promise) { | ||
if (wrapsPrimitiveReceiver && isPrimitive(value)) { | ||
if (isPrimitive(value)) { | ||
return this._then( | ||
@@ -52,3 +51,3 @@ wrapper(value, 2), | ||
if (wrapsPrimitiveReceiver && isPrimitive(reason)) { | ||
if (isPrimitive(reason)) { | ||
return this._then( | ||
@@ -55,0 +54,0 @@ wrapper(reason, 1), |
"use strict"; | ||
module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) { | ||
var util = require("./util.js"); | ||
var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver; | ||
var isPrimitive = util.isPrimitive; | ||
@@ -26,3 +25,3 @@ var thrower = util.thrower; | ||
var then; | ||
if (wrapsPrimitiveReceiver && isPrimitive(reasonOrValue)) { | ||
if (isPrimitive(reasonOrValue)) { | ||
then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue); | ||
@@ -29,0 +28,0 @@ } else { |
@@ -107,7 +107,2 @@ "use strict"; | ||
var wrapsPrimitiveReceiver = (function() { | ||
return this !== "string"; | ||
}).call("string"); | ||
function thrower(r) { | ||
@@ -276,3 +271,2 @@ throw r; | ||
maybeWrapAsError: maybeWrapAsError, | ||
wrapsPrimitiveReceiver: wrapsPrimitiveReceiver, | ||
toFastProperties: toFastProperties, | ||
@@ -279,0 +273,0 @@ filledRange: filledRange, |
{ | ||
"name": "bluebird", | ||
"description": "Full featured Promises/A+ implementation with exceptionally good performance", | ||
"version": "2.9.31", | ||
"version": "2.9.32", | ||
"keywords": [ | ||
@@ -66,3 +66,2 @@ "promise", | ||
}, | ||
"readmeFilename": "README.md", | ||
"main": "./js/main/bluebird.js", | ||
@@ -74,5 +73,4 @@ "browser": "./js/browser/bluebird.js", | ||
"js/zalgo", | ||
"LICENSE", | ||
"zalgo.js" | ||
] | ||
} |
@@ -138,3 +138,3 @@ <a href="http://promisesaplus.com/"> | ||
.catch(function(e) { | ||
console.error("unable to read file") | ||
console.error("unable to read file"); | ||
}); | ||
@@ -157,3 +157,3 @@ ``` | ||
catch(Error e) { | ||
console.error("unable to read file") | ||
console.error("unable to read file"); | ||
} | ||
@@ -174,3 +174,3 @@ ``` | ||
if (error) { | ||
return done(error) | ||
return done(error); | ||
} | ||
@@ -187,3 +187,3 @@ try { | ||
if (err) { | ||
console.log(err) | ||
console.log(err); | ||
} else { | ||
@@ -194,3 +194,3 @@ console.log('All Needle requests successful'); | ||
if (err) { | ||
return done(err) | ||
return done(err); | ||
} | ||
@@ -336,3 +336,3 @@ console.log('All Needle requests saved'); | ||
fs.readFileAsync("myfile.json").then(JSON.parse).then(function (json) { | ||
console.log("Successful json") | ||
console.log("Successful json"); | ||
}).catch(SyntaxError, function (e) { | ||
@@ -420,3 +420,3 @@ console.error("file contains invalid json"); | ||
return Promise.resolve().then(function evenMoreInner() { | ||
a.b.c.d() | ||
a.b.c.d(); | ||
}).catch(function catcher(e){ | ||
@@ -487,6 +487,6 @@ console.error(e.stack); | ||
- `--run=String`. Which tests to run (or compile when testing in browser). Default `"all"`. Can also be a glob string (relative to ./test/mocha folder) | ||
- `--run=String` - Which tests to run (or compile when testing in browser). Default `"all"`. Can also be a glob string (relative to ./test/mocha folder). | ||
- `--cover=String`. Create code coverage using the String as istanbul reporter. Coverage is created in the ./coverage folder. No coverage is created by default, default reporter is `"html"` (use `--cover` to use default reporter). | ||
- `--browser` - Whether to compile tests for browsers. Default `false`. | ||
- `--port=Number` - Whe port where local server is hosted when testing in browser. Default `9999` | ||
- `--port=Number` - Port where local server is hosted when testing in browser. Default `9999` | ||
- `--execute-browser-tests` - Whether to execute the compiled tests for browser when using `--browser`. Default `true`. | ||
@@ -496,3 +496,3 @@ - `--open-browser` - Whether to open the default browser when executing browser tests. Default `true`. | ||
- `--js-hint` - Whether to run JSHint on source files. Default `true`. | ||
- `--saucelabs` Wheter to create a tunnel to sauce labs and run tests in their VMs instead of your browser when compiling tests for browser.Default `false`. | ||
- `--saucelabs` - Whether to create a tunnel to sauce labs and run tests in their VMs instead of your browser when compiling tests for browser. Default `false`. | ||
@@ -499,0 +499,0 @@ ## Benchmarks |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
397312
43
8759