callback-timeout
Advanced tools
Comparing version 3.0.1 to 4.0.0
# callback-timeout changelog | ||
## v4.0.0 | ||
* Added ability to pass `false` as 3rd argument to indicate callback should be | ||
invoked after timing out with no error. | ||
## v3.0.0 | ||
@@ -4,0 +9,0 @@ |
@@ -10,2 +10,4 @@ var errors = require('./errors') | ||
timer = null | ||
if (e === false) | ||
return f.call(f, null) | ||
var msg = e || 'timeout of ' + | ||
@@ -12,0 +14,0 @@ t + 'ms exceeded for callback ' + |
{ | ||
"name": "callback-timeout", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"description": "Invokes callback with single error argument if timeout occurs before it's invoked by other means", | ||
@@ -21,6 +21,6 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@jasonpincin/standard": "~5.3.1-3", | ||
"eventuate-once": "~1.1.0", | ||
"faucet": "0.0.1", | ||
"istanbul": "~0.4.0", | ||
"lower-standard": "~8.0.0-2", | ||
"opn": "~1.0.2", | ||
@@ -27,0 +27,0 @@ "phantomjs-prebuilt": "~2.1.7", |
@@ -44,3 +44,3 @@ callback-timeout | ||
Returns a callback function that will execute after `ms` milliseconds with a single `TimeoutError` argument if not invoked by other means first. If the `ms` timeout argument is omitted, 0, or null, then the timeout is disabled and the original callback is returned. `msg` may be used to set a custom error message (on timeout), otherwise an appropriate one will be set for you. | ||
Returns a callback function that will execute after `ms` milliseconds with a single `TimeoutError` argument if not invoked by other means first. If the `ms` timeout argument is omitted, 0, or null, then the timeout is disabled and the original callback is returned. `msg` may be used to set a custom error message (on timeout), otherwise an appropriate one will be set for you. If `false` is set for the timeout message the callback is returned without an error (null, on timeout). | ||
@@ -47,0 +47,0 @@ ### TimeoutError |
Sorry, the diff of this file is not supported yet
8137
41