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

throttleit

Package Overview
Dependencies
Maintainers
25
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

throttleit - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

5

package.json
{
"name": "throttleit",
"description": "Throttle a function",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [],
"funding": "https://github.com/sponsors/sindresorhus",
"repository": {
"type": "git",
"url": "git://github.com/component/throttle.git"
"url": "git://github.com/sindresorhus/throttleit.git"
},

@@ -10,0 +11,0 @@ "devDependencies": {

26

Readme.md

@@ -7,15 +7,25 @@

## Installation
```sh
$ component install component/throttle
```
$ component install component/throttle
```sh
$ npm install throttleit
```
## Example
var throttle = require('throttle');
window.onresize = throttle(resize, 200);
```js
// with component:
var throttle = require('throttle');
// with npm:
// var throttle = require('throttleit');
function resize(e) {
console.log('height', window.innerHeight);
console.log('width', window.innerWidth);
}
window.onresize = throttle(resize, 200);
function resize(e) {
console.log('height', window.innerHeight);
console.log('width', window.innerWidth);
}
```
## API

@@ -22,0 +32,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