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

p-timeout

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-timeout - npm Package Compare versions

Comparing version 1.2.1 to 2.0.0

4

index.js

@@ -25,2 +25,6 @@ 'use strict';

if (typeof promise.cancel === 'function') {
promise.cancel();
}
reject(err);

@@ -27,0 +31,0 @@ }, ms);

3

package.json
{
"name": "p-timeout",
"version": "1.2.1",
"version": "2.0.0",
"description": "Timeout a promise after a specified amount of time",

@@ -40,4 +40,5 @@ "license": "MIT",

"delay": "^2.0.0",
"p-cancelable": "^0.3.0",
"xo": "*"
}
}

@@ -32,2 +32,4 @@ # p-timeout [![Build Status](https://travis-ci.org/sindresorhus/p-timeout.svg?branch=master)](https://travis-ci.org/sindresorhus/p-timeout)

If you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out.
#### input

@@ -34,0 +36,0 @@

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