Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qard/node-chainer
Build callback chains without ridiculous indentation!
https://github.com/qard/node-chainer
Last synced: 23 days ago
JSON representation
Build callback chains without ridiculous indentation!
- Host: GitHub
- URL: https://github.com/qard/node-chainer
- Owner: Qard
- Created: 2011-04-09T23:58:52.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2019-02-13T03:28:29.000Z (almost 6 years ago)
- Last Synced: 2024-10-25T16:34:05.845Z (26 days ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chainer
[![build status](https://secure.travis-ci.org/Qard/node-chainer.png)](http://travis-ci.org/Qard/node-chainer)
Build simple async execution chains.
```js
var chainer = require('chainer');// Make a new chain.
var chain = chainer();// Add callbacks to chain.
chain.add(function(){
console.log('First!');
chain.next();
});
chain.add(function(){
console.log('Second!');
});chain.add(function hi() {
console.log('hi');
});chain.add('hello', function() {
console.log('hello');
});// Run chain.
chain.run();// Run some explicit function
chain.fn.hi();
chain.fn.hello();
```---
### Copyright (c) 2013 Stephen Belanger
#### Licensed under MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.