true-noop

1.3.1 • Public • Published

true-noop

npm XO code style Build Status codecov

The only true 'no operation' module out there.

Installation

npm install --save true-noop

Usage

let noop = require('true-noop');
 
noop();

What makes this a true 'no operation' function?

While other 'no-op' modules actually go ahead and create then return a new function, e.g.

module.exports = function() {}

module.exports = () => () => {};

true-noop exploits the fact that Function.prototype is in itself a function that does nothing and returns undefined.

module.exports = Function.prototype;

Readme

Keywords

Package Sidebar

Install

npm i true-noop

Weekly Downloads

1

Version

1.3.1

License

MIT

Last publish

Collaborators

  • jacobwarduk