feint
Make a given Function
do nothing at its first call
; const fn = ;; //=> undefined; //=> 1; //=> 1
Installation
Use [npm]https://docs.npmjs.com/about-npm/).
npm install feint
API
;
feint(fn)
fn: Function
Return: Function
It returns a new Function
that does nothing when it's called for the first time. From the second time on, the function performs normally.
;; const feintMkdir = ; ;; //=> false ;; //=> true
License
ISC License © 2018 - 2019 Watanabe Shinnosuke