noop9
Version:
◻️ Supreme nothingness
62 lines (42 loc) • 1.22 kB
Markdown
<h1 align="center">
<br>
<img width="500" src="logo.png" alt="noop3">
<br>
<br>
<br>
</h1>
> ◻️ Supreme nothingness
[](https://travis-ci.org/sindresorhus/noop3) [](https://coveralls.io/github/sindresorhus/noop3?branch=master)

## Install
```
$ npm install noop3
```
## Usage
```js
const noop = require('noop3');
function unicorn(fn) {
fn = fn || noop;
return fn('unicorn');
}
unicorn();
// Also compatible with non-mythical single horned creatures
function narwhal(fn) {
fn = fn || noop;
return fn('narwhal');
}
narwhal();
// Using the noop factory
const fn = require('noop3/factory');
const rainbow = fn();
const flowers = fn();
console.log(rainbow === flowers);
//=> false
rainbow();
//=> undefined
```
## Related
- [noop-cli](https://github.com/sindresorhus/noop-cli) - CLI for this module
- [noop2](https://github.com/yoshuawuyts/noop2) - Prior art
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)