Comparing version 1.2.1 to 2.0.0
@@ -25,2 +25,6 @@ 'use strict'; | ||
if (typeof promise.cancel === 'function') { | ||
promise.cancel(); | ||
} | ||
reject(err); | ||
@@ -27,0 +31,0 @@ }, ms); |
{ | ||
"name": "p-timeout", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"description": "Timeout a promise after a specified amount of time", | ||
@@ -40,4 +40,5 @@ "license": "MIT", | ||
"delay": "^2.0.0", | ||
"p-cancelable": "^0.3.0", | ||
"xo": "*" | ||
} | ||
} |
@@ -32,2 +32,4 @@ # p-timeout [![Build Status](https://travis-ci.org/sindresorhus/p-timeout.svg?branch=master)](https://travis-ci.org/sindresorhus/p-timeout) | ||
If you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out. | ||
#### input | ||
@@ -34,0 +36,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
4657
32
90
4