Provides a few global functions such as `noop`, `throwop`, and `doop`
JavaScript
Latest commit 45c6b46 Nov 25, 2016 @coolaj86 committed on GitHub Update README.md
Permalink
Failed to load latest commit information.
examples fixed global error Feb 27, 2011
noop fixed global error Feb 27, 2011
README.md Update README.md Nov 25, 2016

README.md

Daplie is Taking Back the Internet!

Stop serving the empire and join the rebel alliance!

node-noop

Provides a few global functions such as noop, throwop, and doop

npm install noop
require('noop');

API

global.noop

Does nothing

function noop() {}

global.throwop(err)

Throws if err is defined

function throwop(err) {
  if (err) {
    throw err;
  }
}

global.doop(callback)

Calls callback or noop

function doop(callback, args, context) {
  if ('function' === typeof callback) {
    callback.apply(context, args);
  }
}