pipe-chain
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

pipe-chain

Build Status npm version MIT License

Simple chainable object.

Usage

// if use with nodejs then require('pipe-chain')
// if use with typescript then import 'pipe-chain'
 
{a:3,b:4,c:2}.pipe(Object.keys)      // -> ['a','b','c']
[3,4,5,2,8,6].pipe(v=>Math.min(...v) // -> 2
(3.63).pipe(Math.floor)              // -> 3
'filter'.pipe(v=>'-webkit-'+v)       // -> '-webkit-filter'
 
[6,4,8]
  .pipe(v=>Math.min(...v))          // ... 4
  .pipe(Math.sqrt)                  // -> 2

demo

Instal

npm install pipe-chain

Licence

MIT

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i pipe-chain

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • mkgaru