Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Provides a few global functions such as `noop`, `throwop`, and `doop`
JavaScript
Branch: master
Failed to load latest commit information.
examples fixed global error
noop fixed global error
README.md spell "require" correctly

README.md

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);
  }
}
Something went wrong with that request. Please try again.