f.luent
v1.1.1
Published
Fluent Javascript Flows
Downloads
4
Maintainers
Readme
f.luent
Zero-dependencies Fluent Javascript Control Flow
Fluent is my personal attempt at simplifying and making more readable the control flow of a Javascript program, by only using methods and exploiting chaining whenever it's possible.
Installation
npm install f.luent
Example Usage
var f = require('f.luent');
// ...
f.from(array)
.where({prop1: 'val1'})
.then(function(item, stop)
{
console.log('item: %s', JSON.stringify(item));
stop(); // eventually decide to stop processing results
})
.otherwise(function(err)
{
console.log(err);
});