A simple nop (no-op) function helper. Nop is a function that does nothing.
npm install @pipeletteio/nop
import { nop, isNop } from '@pipeletteio/nop';
// const { nop, isNop } = require('@pipeletteio/nop');
isNop(nop); // => true
isNop(function () {}); // => false
Read documentation for more informations.
The nop function which will be used to replace the non cancellable callables.
argument | type | details |
---|---|---|
...arg | any[] | ... |
Return void.
Check if the argument is the nop function.
argument | type | details |
---|---|---|
arg | any | The checked argument. |
Return a boolean.