nodejs-fx

1.1.0 • Public • Published

Node FX

Build Status Coverage Status Code Climate JavaScript Style Guide tested with jest npm

Small functional utility library for JavaScript.

Installation

npm install nodejs-fx --save

or

yarn add nodejs-fx

Usage

const NodeFx = require('nodejs-fx')

const is401 = err => err.status === 401
const is404 = err => err.status === 404
const err = { status: 401 }

const res = NodeFx.anyOf(is404, is401)(err)

or using destructuring

const { pipe, curry } = require('nodejs-fx')

const sum = (x, y) => x + y
const addTwo = curry(sum)(2)
const addFive = curry(sum)(5)

const x = pipe(sum, addTwo, addFive)(4, 2)

API

License

This project is available under MIT License. See LICENSE.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    5
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i nodejs-fx

Weekly Downloads

5

Version

1.1.0

License

MIT

Unpacked Size

330 kB

Total Files

69

Last publish

Collaborators

  • vitor.salgado