Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master
Octocat-spinner-32 examples fixed global error February 27, 2011
Octocat-spinner-32 noop fixed global error February 27, 2011
Octocat-spinner-32 README.md spell "require" correctly January 13, 2011
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.