asynctools 0.1.0

Haxe implementation of the npm async package.

Released 2016-04-11.

To install, run:

haxelib install asynctools 0.1.0

See using Haxelib in Haxelib documentation for more information.

Maintainerciscoheat
Websitehttps://github.com/ciscoheat/asynctools
Current version0.1.0
StatisticsInstalled 2325 times
LicenseMIT
Tags

README.md

AsyncTools

A Haxe implementation of Async. The most important parts are working:

  • aEach, aEachSeries, aEachLimit
  • aMap, aMapSeries, aMapLimit
  • aFilter, aFilterSeries, aFilterLimit

Also includes a slightly modified version of the @async feature in haxe-js-kit

The change is that you can do this:

class YourClass implements Async {
	function anAsyncMethod(done : Error -> Void) : Void {
		var err = @async(err => done) some.otherAsync();
		// ...
	}
}

Which will add an if statement directly after the call:

function anAsyncMethod(done : Error -> Void) : Void {
	var err = @async(err => done) some.otherAsync();
	if(err != null) return done(err);
	// ...
}

Installing and using

haxelib install asynctools

using AsyncTools

class YourClass implements Async