Comparing version 4.2.4 to 4.2.6
@@ -18,10 +18,6 @@ 'use strict'; | ||
} else if ((f instanceof Promise) || (f.then instanceof Function)) { | ||
super(function(resolve, reject) { | ||
f.then(resolve, reject); | ||
}); | ||
super((resolve, reject) => f.then(resolve, reject)); | ||
} else if (f instanceof Error) { | ||
// sugar for 'rethrow' | ||
super(function(resolve, reject) { | ||
reject(f); | ||
}); | ||
super((resolve, reject) => reject(f)); | ||
} else if (f instanceof Function) { | ||
@@ -31,5 +27,3 @@ super(f); | ||
// anything else, resolve with value | ||
super(function(resolve, reject) { | ||
resolve(f); | ||
}); | ||
super(resolve => resolve(f)); | ||
} | ||
@@ -101,3 +95,3 @@ } | ||
return new Promish(resolve => resolve(f.apply(self, args))); | ||
} | ||
}; | ||
} | ||
@@ -157,3 +151,3 @@ | ||
return Promish.apply(f, arguments); | ||
} | ||
}; | ||
} | ||
@@ -169,3 +163,3 @@ static denodify(f) { | ||
return Promish.post(o, f, arguments); | ||
} | ||
}; | ||
} | ||
@@ -177,3 +171,3 @@ | ||
return Promish.post(o, f, arguments); | ||
} | ||
}; | ||
} | ||
@@ -190,18 +184,17 @@ | ||
while (oo && (oo !== Object)) { | ||
for (var i in oo) { | ||
var value = oo[i]; | ||
if (!p[i + suffix] && (value instanceof Function)) { | ||
p[i + suffix] = Promish.bind(o, value); | ||
for (let i in oo) { | ||
if (!p[i + suffix] && (oo[i] instanceof Function)) { | ||
p[i + suffix] = Promish.bind(o, oo[i]); | ||
} | ||
} | ||
oo = oo.__proto__ || oo.prototype; | ||
oo = Object.getPrototypeOf(oo) || oo.prototype; | ||
} | ||
if (inPlace) { | ||
for (var i in p) { | ||
o[i] = p[i]; | ||
for (let i in p) { | ||
if(p[i] instanceof Function) { | ||
o[i] = p[i]; | ||
} | ||
} | ||
p = o; | ||
} else { | ||
// waiting for ES6 Proxies! | ||
} | ||
@@ -241,3 +234,3 @@ | ||
}); | ||
}; | ||
} | ||
@@ -260,2 +253,2 @@ // old-style for ease of adoption | ||
module.exports = Promish; | ||
module.exports = Promish; |
{ | ||
"name": "promish", | ||
"version": "4.2.4", | ||
"version": "4.2.6", | ||
"description": "ES6 Promise Shim", | ||
@@ -19,4 +19,4 @@ "private": false, | ||
"then", "catch", "finally", | ||
"race", "all", "any", | ||
"Promisification", "call", "apply" | ||
"race", "all", "any", "some", "spread", | ||
"Promisify","Promisification", "call", "apply" | ||
], | ||
@@ -29,9 +29,13 @@ "engines" : { | ||
"devDependencies": { | ||
"bluebird": "*", | ||
"chai": "*", | ||
"jshint": "2.8.x", | ||
"mocha": "*", | ||
"q": "*", | ||
"bluebird": "*" | ||
"q": "*" | ||
}, | ||
"scripts": { | ||
"test": "mocha spec" | ||
"jshint": "npm run jshint-lib & npm run jshint-spec", | ||
"jshint-lib": "node node_modules/jshint/bin/jshint --config ./.jshintrc ./lib --verbose", | ||
"jshint-spec": "node node_modules/jshint/bin/jshint --config ./.jshintrc-spec ./spec --verbose", | ||
"test": "mocha spec" | ||
}, | ||
@@ -38,0 +42,0 @@ "main": "lib/promish.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
20403
4
0
448
5
220