noop4deprecated

No operation avoiding references

Usage no npm install needed!

<script type="module">
  import noop4 from 'https://cdn.skypack.dev/noop4';
</script>

README

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