Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AndersDJohnson/actionscript-async
Async utilities for ActionScript.
https://github.com/AndersDJohnson/actionscript-async
Last synced: about 2 months ago
JSON representation
Async utilities for ActionScript.
- Host: GitHub
- URL: https://github.com/AndersDJohnson/actionscript-async
- Owner: AndersDJohnson
- License: mit
- Created: 2014-04-27T07:01:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-04-08T01:02:35.000Z (almost 6 years ago)
- Last Synced: 2024-08-29T02:02:14.624Z (5 months ago)
- Language: ActionScript
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actionscript-sorted - actionscript-async - Async utilities for ActionScript. (Utilities / Other Utilities)
README
actionscript-async
==================Async utilities for ActionScript, in the style of the [async] module for Node.js.
Possible alternative to [AS3Commons Async].
```as
import com.AndersDJohnson.async.Async;// ...
Async.tasks( [
function ( callback:Function):void {
// ...
callback( null /* , ... args */ );
},
function ( callback:Function):void {
// ...
callback( null /* , ... args */ );
}
// ...
], function ( error:Error, results:Array ) {
// results is now an array with results passed to each task function's callback
}
```## Examples
```as
import com.AndersDJohnson.async.Async;// ...
Async.tasks( [
function ( callback:Function):void {
callback( null, 'one', 1 );
},
function ( callback:Function):void {
callback( null, 'two', 2 );
}
], function ( error:Error, results:Array ) {
// results is now equal to [ ['one', 1], ['two', 2] ]
}
```[async]: https://github.com/caolan/async
[AS3Commons Async]: http://www.as3commons.org/as3-commons-async/index.html