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

@github/mini-throttle

Package Overview
Dependencies
Maintainers
14
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/mini-throttle - npm Package Compare versions

Comparing version 1.0.1 to 1.0.3

30

dist/index.d.ts
export type ThrottleOptions = {
start?: boolean,
middle?: boolean,
/**
* Fire immediately on the first call
*/
start?: boolean
/**
* If true, fire as soon as `wait` has passed
*/
middle?: boolean
/**
* Cancel after the first successful call
*/
once?: boolean
}
export function throttle<T>(
callback: (...args: T[]) => any,
wait: number,
export function throttle<T extends unknown[]>(
callback: (...args: T) => unknown,
wait?: number,
opts?: ThrottleOptions
): (...args: T[]) => void
): ((...args: T) => void) & {cancel(): void}
export function debounce<T>(
callback: (...args: T[]) => any,
wait: number,
export function debounce<T extends unknown[]>(
callback: (...args: T) => unknown,
wait?: number,
opts?: ThrottleOptions
): (...args: T[]) => void
): ((...args: T) => void) & {cancel(): void}
{
"name": "@github/mini-throttle",
"version": "1.0.1",
"version": "1.0.3",
"description": "",

@@ -23,3 +23,3 @@ "repository": "github.com/github/mini-throttle",

"test": "BABEL_ENV=umd mocha --require @babel/register && npm run tsc",
"tsc": "tsc --noEmit --strict test/index.ts"
"tsc": "tsc --noEmit test/index.ts"
},

@@ -72,2 +72,20 @@ "babel": {

"plugin:escompat/recommended"
],
"overrides": [
{
"files": "test/*",
"rules": {
"no-console": "off"
}
},
{
"files": "**.ts",
"parser": "@typescript-eslint/parser",
"rules": {
"import/named": "off",
"import/namespace": "off",
"import/no-deprecated": "off",
"flowtype/require-valid-file-annotation": "off"
}
}
]

@@ -84,2 +102,3 @@ },

"@babel/register": "^7.4.4",
"@typescript-eslint/parser": "^1.9.0",
"chai": "^4.2.0",

@@ -86,0 +105,0 @@ "eslint": "^5.16.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