0.1.0 • Published 10 years ago

aonce v0.1.0

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

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
});