npm.io
1.2.0 • Published 10 years ago

noop4

Licence
MIT
Version
1.2.0
Deps
0
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

noop4

No operation avoiding references.

NPM Version NPM Downloads License

Install

$ npm install noop4 --save

Usage

Nothing happens and no references are created.

var noop = require('noop4');

function example (fn) {
  fn = fn || noop();
  return fn('beep');
}

example();
// nothing happened

Why?

Sometimes the noop method is enriched with methods and properties. To ensure a clean usage noop4 creates a new function each time avoiding previous references.

See also

License

MIT

Keywords