Skip to content

neosiae/limit-fn-calls

Repository files navigation

limit-fn-calls

Limit how many times function can be called

Install

$ npm install limit-fn-calls

Usage

import limitFnCalls from 'limit-fn-calls';

const limitedLog = limitFnCalls(console.log, 3);

limitedLog('1'); // 1
limitedLog('2'); // 2
limitedLog('3'); // 3
limitedLog('4'); // Stops here

About

Limit how many times function can be called

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published