structr-step
Last updated 13 years ago by architectd .
Repository · Original npm · Tarball · package.json
$ cnpm install structr-step 
SYNC missed versions from official npm registry.

Structr-step makes asyncronous function chainable

Example


var structr = require("structr"),
fs = require("fs");

structr.mixin(require("structr-step"));



var TestClass = structr({
	
	
	/**
	 */

	"step asyncFn": function(path, next) {
		fs.readFile(path, next);
	},

	/**
	 */

	"step asyncFn2": function(path, next) {
		fs.readFile(path, next);
	}
});



var test = new TestClass();
test.asyncFn(__filename, function(err, content) {
	
});
test.asyncFn2(__filename, function(err, stat) {
	
});

Current Tags

  • 0.0.3                                ...           latest (13 years ago)

4 Versions

  • 0.0.3                                ...           13 years ago
  • 0.0.2                                ...           14 years ago
  • 0.0.1                                ...           14 years ago
  • 0.0.0                                ...           14 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
  • tq 0.0.x
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |