Package Exports
- @pipeletteio/nop
- @pipeletteio/nop/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@pipeletteio/nop) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@pipeletteio/nop
A simple nop (no-op) function helper. Nop is a function that does nothing.
Installation
npm install @pipeletteio/nopExample
import { nop, isNop } from '@pipeletteio/nop';
// const { nop, isNop } = require('@pipeletteio/nop');
isNop(nop); // => true
isNop(function () {}); // => falseDocs
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.