Skip to content

Instantly share code, notes, and snippets.

@EchoFUN
EchoFUN / step.js
Created June 15, 2012 04:52 — forked from leizongmin/step.js
JavaScript简单异步执行
/**
* 使用方法:
* step(function (data, next) {
* // step 1, do somethings...
* next(null, data);
* }, function (data, next) {
* // step 2, do somethings...
* next(null, data);
* }, function (err, data) {
* // callback
@EchoFUN
EchoFUN / step.js
Created June 15, 2012 04:47 — forked from leizongmin/step.js
JavaScript简单异步执行
/**
* 使用方法:
* step(function (data, next) {
* // step 1, do somethings...
* next(null, data);
* }, function (data, next) {
* // step 2, do somethings...
* next(null, data);
* }, function (err, data) {
* // callback