faussaire-util v0.1
Bundle utilitary functions for faussaire
Installation
npm install --save-dev faussaire-util
Overview
Faussaire itself is a pretty low-level library. Being modular, there are many things to be added for it to be really fast and easy to use.
Runner
A Runner is a higher order function returning an other function matching the Controller.run signature.
function(params, options) => Response
To get started with ES6, just import Runner
from faussaire-util
To start using a Runner in your Controller, set it to your Controller.run method :
Store
Before starting any example, let's assume we have the following store :
const store = id: 1 name: "Rewieer" group: "admin" id: 2 name: "Bardepic" group: "user" id: 3 name: "Matt" group: "user";
Runner.match(obj)
Match allows you to search in a store an item matching your own defined condition. It works as it follow :
Runner;
The example pretty self-explanatory.
Runner.group(obj)
Group allows you to fetch all the items from the store matching your condition.
Runner;