Comparing version 1.2.2 to 1.3.0
13
index.js
var isPromise = require('is-promise') | ||
var nextTick; | ||
if (typeof setImediate === 'function') nextTick = setImediate | ||
else if (typeof process === 'object' && process && process.nextTick) nextTick = process.nextTick | ||
else nextTick = function (cb) { setTimeout(cb, 0) } | ||
var extensions = []; | ||
@@ -42,3 +47,3 @@ | ||
if (skipTimeout) timeoutDone() | ||
else setTimeout(timeoutDone, 0) | ||
else nextTick(timeoutDone) | ||
} else if (isFulfilled) { | ||
@@ -79,3 +84,7 @@ resolver.fulfill(value) | ||
if (typeof fn === 'function') { | ||
fn(resolver) | ||
try { | ||
fn(resolver) | ||
} catch (ex) { | ||
resolver.reject(ex); | ||
} | ||
} | ||
@@ -82,0 +91,0 @@ }()); |
{ | ||
"name": "promise", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "Bare bones Promises/A+ implementation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,3 +47,3 @@ [![Build Status](https://travis-ci.org/then/promise.png)](https://travis-ci.org/then/promise) | ||
} | ||
Awesome.prototype = new Promise(); | ||
Awesome.prototype = Object.create(Promise.prototype); | ||
Awesome.prototype.constructor = Awesome; | ||
@@ -50,0 +50,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5830
92
0