Socket
Book a DemoInstallSign in
Socket

debounce-throttle

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debounce-throttle

custom build debounce throttle by lodash cli

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
399
10.53%
Maintainers
1
Weekly downloads
 
Created
Source

debounce-throttle

原因

只想简单使用 lodash 的 debounce 和 throttle 函数,但是 lodash 库显得太大了,分别下载 lodash.debounce 和 lodash.throttle 又有代码冗余,因为 lodash.throttle 内包含 lodash.debounce 的代码。所以利用lodash-cli定制了 debounce 和 throttle 函数。

使用

该定制为 UMD 的,所以支持多种引用方式

import 引入

import {debounce, throttle} from 'debounce-throttle'

require 引入

const {debounce, throttle} = require 'debounce-throttle'

定义在全局对象上

const {debounce, throttle} = window._

Keywords

lodash

FAQs

Package last updated on 15 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts