with-timeout
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -71,3 +71,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
if (typeof time === 'string') { | ||
time = parseInt(time); | ||
time = parseInt(time, 10); | ||
} | ||
@@ -74,0 +74,0 @@ if (typeof time !== 'number' || Number.isNaN(time)) { |
@@ -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){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"]}])}); | ||
!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,10)),("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"]}])}); |
export default function withTimeout (fn, time, ...args) { | ||
if (typeof time === 'string') { | ||
time = parseInt(time) | ||
time = parseInt(time, 10) | ||
} | ||
@@ -5,0 +5,0 @@ if (typeof time !== 'number' || Number.isNaN(time)) { |
@@ -15,3 +15,3 @@ 'use strict'; | ||
if (typeof time === 'string') { | ||
time = parseInt(time); | ||
time = parseInt(time, 10); | ||
} | ||
@@ -18,0 +18,0 @@ if (typeof time !== 'number' || Number.isNaN(time)) { |
{ | ||
"name": "with-timeout", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Promisified, boilerplate-free setTimeout", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
8039