Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 503 Bytes

File metadata and controls

28 lines (19 loc) · 503 Bytes

function-flow

A small typed left-to-right function composition helper.

Install

npm install @arylo-scripts/function-flow

Usage

import flow from '@arylo-scripts/function-flow'

const result = flow(1, (value) => String(value), (value) => value.length)

flow passes the result of each function to the next function from left to right. TypeScript overloads preserve the value type through supported chains.

Development

npm install
npm run lint
npm run build