JSPM

nodejs-fx

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q35918F
  • License MIT

Small functional utility library for JavaScript

Package Exports

  • nodejs-fx

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nodejs-fx) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.