0.0.1 • Published 3 years ago

@tomer/fn v0.0.1

Weekly downloads
1
License
Apache 2.0
Repository
github
Last release
3 years ago

fn

A tree-shakeable functional programming library with lazy sync, async, and concurrent iteration.

Install

$ npm i @tomer/fn

Usage

This package is still under active development. Until I have better documentation take a look at the following example:

import { filter, join, map, pipe, repeat, take } from '@tomer/fn'

const string = 'rainbows! And unicorns!!!'

//=> RAINBOWS AND UNICORNS!!! RAINBOWS AND UNICORNS!!! RAINBOWS AND UNICORNS!!
console.log(
  pipe(
    string,
    filter(c => c !== '!'),
    map(c => c.toUpperCase()),
    join(''),
    repeat,
    map(s => `${s}!!!`),
    take(3),
    join(' ')
  )
)

Everything is lazy!

Contributing

Stars are always welcome!

For bugs and feature requests, please create an issue.

For pull requests, please read the contributing guidelines.

License

Apache 2.0

This is not an official Google product.