pipe-js

1.0.0 • Public • Published

pipe-js

Travis build Codecov coverage Version Downloads MIT license

A backwards-compatible way of streamlining chained function calls in a readable and functional manner

Usage

const pipe = require('pipe-js')
 
const hello = 'hello'
 
const capitalize = str => str[0].toUpperCase() + str.substring(1)
const duplicate = str => `${str}-${str}`
const exclaim = str => str + '!'
 
pipe(hello).through(duplicate, capitalize, [String.prototype.concat, ' world'], exclaim) // Hello-hello world!

Package Sidebar

Install

npm i pipe-js

Weekly Downloads

6

Version

1.0.0

License

MIT

Last publish

Collaborators

  • maglovanyi