await-timeout
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "await-timeout", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A Promise-based API for setTimeout / clearTimeout", | ||
@@ -20,5 +20,6 @@ "author": { | ||
"test": "mocha test/setup test/specs", | ||
"test-installed": "node scripts/install-local && LIB_PATH=../.installed/node_modules/await-timeout npm t", | ||
"test:installed": "node scripts/install-local && LIB_PATH=../.installed/node_modules/await-timeout npm t", | ||
"build:es5": "babel src -d es5 --presets=@babel/preset-env", | ||
"ci": "npm run lint && npm test", | ||
"prerelease": "npm run lint && npm test && npm run test-installed", | ||
"prerelease": "run-s lint test test:installed build:es5", | ||
"release": "npm version $VER && npm publish", | ||
@@ -39,2 +40,5 @@ "postrelease": "git push --follow-tags --no-verify", | ||
"devDependencies": { | ||
"@babel/cli": "^7.7.5", | ||
"@babel/core": "^7.7.5", | ||
"@babel/preset-env": "^7.7.6", | ||
"assert-rejects": "^1.0.0", | ||
@@ -46,2 +50,3 @@ "eslint": "^6.6.0", | ||
"mocha": "^6.2.2", | ||
"npm-run-all": "^4.1.5", | ||
"sinon": "^7.5.0" | ||
@@ -48,0 +53,0 @@ }, |
@@ -60,10 +60,2 @@ <div align="center"> | ||
#### Usage in ES5 | ||
If you are targeting ES5 environment please use transpiled build from `await-timeout/dist/es5`: | ||
```js | ||
import Timeout from 'await-timeout/dist/es5'; | ||
... | ||
``` | ||
## API | ||
@@ -101,3 +93,3 @@ ### new Timeout() | ||
Wraps existing promise with timeout: | ||
* promise automatically rejected after timeout | ||
* returned promise automatically rejected after timeout | ||
* timeout automatically cleared if main promise resolves first | ||
@@ -104,0 +96,0 @@ ```js |
12193
6
157
11
171