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;

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.1
    2
    • latest

Version History

Package Sidebar

Install

npm i true-noop

Weekly Downloads

6

Version

1.3.1

License

MIT

Last publish

Collaborators

  • jacobwarduk