promise-timeout-plus
Promise.timeout() for ES6; reject a Promise after a given timeout.
Install
Install with npm
$ npm i promise-timeout-plus --save
Usage
// var Promise = require('any-promise');Promise; ; // --> 'Hello' if myPromiseFunction resolved within 1000ms
API
`.timeout(ms[,error])
Reject the promise if it's not resolved after ms
milliseconds
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Andreas Pizsa
License
Copyright © 2016 Andreas Pizsa Released under the MIT license.
This file was generated by verb-cli on February 09, 2016.