npm.io
0.1.0 • Published 12 years ago

aonce

Licence
—
Version
0.1.0
Deps
0
Vulns
0
Weekly
0
Stars
1
DeprecatedThis package is deprecated

aonce

Run an async function once, no matter how many times it's called.

Example

var init = aonce(function(cb) {
	// Do some initialization
	results = {};
	cb(results);
});

// Later:

init(function(results) {
	// do something with results
});

// Elsewhere:

init(function(results) {
	// do something else with results
});