safecb
normalize callback arguments
Last updated 11 years ago by tenaciousmv .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install safecb 
SYNC missed versions from official npm registry.

safecb

var safe = require('safecb')

function doStuff (cb) {
  cb = safe(cb)
  // prevent these typical problems:
  cb() // synchronous invocation
  cb() // multiple invocations
  cb() // undefined is not a function (if cb is undefined)
}

Current Tags

  • 0.0.1                                ...           latest (11 years ago)

1 Versions

  • 0.0.1                                ...           11 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |