Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/forivall/na.js
:fries: Na(Sodium).js - the a stands for async. DI and async.auto married together!
https://github.com/forivall/na.js
Last synced: about 1 month ago
JSON representation
:fries: Na(Sodium).js - the a stands for async. DI and async.auto married together!
- Host: GitHub
- URL: https://github.com/forivall/na.js
- Owner: forivall
- License: apache-2.0
- Created: 2013-11-04T02:08:53.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T00:55:21.000Z (4 months ago)
- Last Synced: 2024-10-14T09:57:58.316Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Na.js (pronounced sodium.js)
====Takes a mostly new approach to control flow, yet is built upon the existing concepts, such as dependancy injection.
[![Build Status](https://secure.travis-ci.org/forivall/Na.js.png?branch=master)](http://travis-ci.org/forivall/Na.js)
## Getting Started
Install the module with: `npm install na````javascript
var na = require('na');
na({ name: (injected_names[, $callback]) { $callback(...) OR return promise; OR return simple_value; }});
```## Documentation
Currently, Na.js is a facade to `async.auto`, that reduces the need to repeat and unpack arguments.## Examples
See the test file for now.## TODOs
- Remove dependancy on async.auto (browser-native)
- Allow more advanced injection parameters ('array[0]': ..., slices, 'object.foo')
- Better error handling
- Use cssauron-falafel to extract the $annotate function from angularjs directly (and other code bits from angularjs; stay tuned for more)
- native support for returning promises of any library (just supply a factory function!)
- allow adding tasks after the async process has started
- allow multiple possible endpoints (i.e. whichever ends first)
- anything else I remember## Similar projects
[shepard](https://github.com/Obvious/shepherd) - I could make the Na.js interface a simplified facade for shepherd.
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).## Release History
_(Nothing yet)_## License
Copyright (c) 2013 Jordan James Klassen. Licensed under the Apache2 license.