with-timeout
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -77,3 +77,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
return new Promise(function (resolve, reject) { | ||
return new Promise(function (resolve) { | ||
var timeout = setTimeout(function () { | ||
@@ -80,0 +80,0 @@ clearTimeout(timeout); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.withTimeout=t():e.withTimeout=t()}(this,function(){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t){"use strict";function o(e,t){for(var o=arguments.length,r=Array(o>2?o-2:0),n=2;n<o;n++)r[n-2]=arguments[n];var i=this;return"string"==typeof t&&(t=parseInt(t)),("number"!=typeof t||Number.isNaN(t))&&(t=500),new Promise(function(o,n){var u=setTimeout(function(){clearTimeout(u),o("function"==typeof e?e.apply(i,r):void 0)},t)})}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.withTimeout=t():e.withTimeout=t()}(this,function(){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t){"use strict";function o(e,t){for(var o=arguments.length,r=Array(o>2?o-2:0),n=2;n<o;n++)r[n-2]=arguments[n];var i=this;return"string"==typeof t&&(t=parseInt(t)),("number"!=typeof t||Number.isNaN(t))&&(t=500),new Promise(function(o){var n=setTimeout(function(){clearTimeout(n),o("function"==typeof e?e.apply(i,r):void 0)},t)})}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]}])}); |
@@ -9,3 +9,3 @@ export default function withTimeout (fn, time, ...args) { | ||
return new Promise((resolve, reject) => { | ||
return new Promise(resolve => { | ||
const timeout = setTimeout(() => { | ||
@@ -12,0 +12,0 @@ clearTimeout(timeout) |
@@ -21,3 +21,3 @@ 'use strict'; | ||
return new Promise(function (resolve, reject) { | ||
return new Promise(function (resolve) { | ||
var timeout = setTimeout(function () { | ||
@@ -24,0 +24,0 @@ clearTimeout(timeout); |
{ | ||
"name": "with-timeout", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Promisified, boilerplate-free setTimeout", | ||
@@ -20,4 +20,6 @@ "main": "lib/index.js", | ||
"babel-preset-es2015": "^6.9.0", | ||
"coveralls": "^2.11.12", | ||
"cross-env": "^1.0.8", | ||
"ghooks": "^1.3.2", | ||
"nyc": "^7.1.0", | ||
"rimraf": "^2.5.3", | ||
@@ -32,2 +34,4 @@ "sinon": "^1.17.4", | ||
"check": "standard && npm test", | ||
"coverage": "nyc npm test", | ||
"report-coverage": "cat coverage/lcov.info | coveralls", | ||
"build:commonjs": "babel index.js --out-dir lib", | ||
@@ -71,2 +75,13 @@ "build:umd": "cross-env NODE_ENV=development webpack --display-modules index.js dist/with-timeout.js", | ||
}, | ||
"nyc": { | ||
"reporter": [ | ||
"lcov", | ||
"text" | ||
], | ||
"lines": 100, | ||
"statements": 100, | ||
"functions": 100, | ||
"branches": 100, | ||
"check-coverage": true | ||
}, | ||
"config": { | ||
@@ -73,0 +88,0 @@ "ghooks": { |
@@ -6,2 +6,3 @@ # with-timeout | ||
[](https://travis-ci.org/danne931/with-timeout) | ||
[](https://coveralls.io/github/danne931/with-timeout) | ||
[](https://www.npmjs.com/package/with-timeout) | ||
@@ -8,0 +9,0 @@ [](http://standardjs.com/) |
8024
35
15