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

p-throttle

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-throttle - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

15

index.d.ts

@@ -13,11 +13,16 @@ export class AbortError extends Error {

/**
Whether future function calls should be throttled or count towards throttling thresholds.
Whether future function calls should be throttled or count towards throttling thresholds.
@default true
*/
@default true
*/
isEnabled: boolean;
/**
Abort pending executions. All unresolved promises are rejected with a `pThrottle.AbortError` error.
*/
The number of queued items waiting to be executed.
*/
readonly queueSize: number;
/**
Abort pending executions. All unresolved promises are rejected with a `pThrottle.AbortError` error.
*/
abort(): void;

@@ -24,0 +29,0 @@ };

@@ -95,4 +95,10 @@ export class AbortError extends Error {

Object.defineProperty(throttled, 'queueSize', {
get() {
return queue.size;
},
});
return throttled;
};
}
{
"name": "p-throttle",
"version": "5.0.0",
"version": "5.1.0",
"description": "Throttle promise-returning & async functions",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -99,2 +99,8 @@ # p-throttle

### throttledFn.queueSize
Type: `number`
The number of queued items waiting to be executed.
## Related

@@ -101,0 +107,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