0.1.1 • Published 11 years ago

pho v0.1.1

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

pho

Delicious functions for the hungry node.js developer.

Installation:

$ npm install pho

API

var pho = require( "pho" );

or if you prefer to use with underscore

var _   = require( "underscore" )
  , pho = require( "pho" ).mixin( _ );

Now functions exported by pho are available on _ (underscore) object.

onErr( err, callback )

If err is defined, then callback is called with err as a parameter. Returns true if err is defined and false otherwise.

Example:

If there is an error, then done is called and nextStep is never executed.

pho.onErr( err, done ) || nextStep();

is equivalent to

if ( err ) {

    return done( err );
}

nextStep();

Changelog

  • 0.1.0 - Initial release.