fj-cond

1.0.0 • Public • Published

fj-cond

Build Status npm version

Call the first function whichs condition is true.

Installation

npm install fj-cond --save

Usage

var cond = require('fj-cond');
 
let eq = (x) => (y) => x === y;
 
cond([
    [eq(1), assert.fail],
    [eq(2), assert.fail],
    [eq(3), (x) => console.log(x)],
    [T, assert.fail]
])(3));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i fj-cond

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • schtoeffel
  • hemanth