@pipeletteio/nop
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@pipeletteio/nop

A simple nop (no-op) function helper. Nop is a function that does nothing.

Installation

npm install @pipeletteio/nop

Example

import { nop, isNop } from '@pipeletteio/nop';
// const { nop, isNop } = require('@pipeletteio/nop');

isNop(nop); // => true

isNop(function () {}); // => false

Docs

Read documentation for more informations.

API

nop

The nop function which will be used to replace the non cancellable callables.

argument type details
...arg any[] ...

Return void.

isNop

Check if the argument is the nop function.

argument type details
arg any The checked argument.

Return a boolean.

Readme

Keywords

none

Package Sidebar

Install

npm i @pipeletteio/nop

Weekly Downloads

988

Version

1.0.5

License

MIT

Unpacked Size

6.21 kB

Total Files

7

Last publish

Collaborators

  • ashed