Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

with-timeout

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

with-timeout - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

dist/with-timeout.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc