New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

concall

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

concall

Debounce, throttle, delay and repeat

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

concall.js

Debouncing, throttling and more

⚙️ Installation

npm i concall

CDN Links:

  • https://cdn.jsdelivr.net/npm/concall
  • https://www.unpkg.com/concall

📖 Usage

◉ Import

// ES6
import concall from "concall";

// commonjs
const concall = require("concall");

◉ Debounce

const func = concall.debounce((text) => {
    console.log(text);
}, 2000); // (function, delay)

func("Hello world!");

func("Hello world!");

func("Hello world!");

◉ Throttle

const func = concall.throttle((text) => {
    console.log(text);
}, 2000); // (function, delay)

func("Hello world!");

func("Hello world!");

func("Hello world!");

◉ Delay

const func = concall.delay((text) => {
    console.log(text);
}, 2000); // (function, delay)

func("Hello world!");

◉ Repeat forever

const func = concall.repeat((text) => {
    console.log(text);
}, 2000); // (function, delay)

func("Hello world!");

◉ Repeat "n" times

const func = concall.repeat((text) => {
    console.log(text);
}, 2000, 2); // (function, delay, times)

func("Hello world!"); // will repeat 2 times

Support me on PatreonCheck out my socials

Keywords

debounce

FAQs

Package last updated on 12 May 2023

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