New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

just-throttle

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-throttle - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "just-throttle",
"version": "1.0.1",
"version": "1.0.2",
"description": "return a throttled function",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,13 +11,9 @@ ## just-throttle

const fn1 = throttle(() => console.log('Hello'), 500);
const fn1 = throttle(() => console.log('hello'), 500, true);
setInterval(fn1, 400);
// logs 'hello' immediately and then every 500ms
const fn2 = throttle(() => console.log('Hello'), 500, {leading: false});
const fn2 = throttle(() => console.log('hello'), 500);
setInterval(fn2, 400);
// logs 'hello' after 500ms and then every 500ms
const fn3 = throttle(() => console.log('Hello'), 500, {trailing: false});
setInterval(fn3, 400);
// logs 'hello' immediately and then every 500ms, but not after final interval
```
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