1.2.0 • Published 8 years ago

noop4 v1.2.0

Weekly downloads
26
License
MIT
Repository
github
Last release
8 years ago

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