Iterable Functions
Really simple functions for working with async iterable types, inspired by F#'s collection modules design.
Features
- Full type-safety with TypeScript
- Zero dependency
- Pure functions
Installation
Add package using NPM or yarn
npm i --save async-iterable-fns
yarn add async-iterable-fns
You can import the top level modules directly:
Examples
Calculating primes lazily with iterators can either be done by calling each of the basic functions:
const findPrimes = async { const range = const mapped = const filtered = const primes = return await }
or can utilise the chainable methods:
const findPrimesChained = async { const primes = for { console }}
NPM scripts
yarn test
: Run test suiteyarn start
: Runyarn build
in watch modeyarn test:watch
: Run test suite in interactive watch modeyarn test:prod
: Run linting and generate coverageyarn build
: Generate bundles and typings, create docsyarn lint
: Lints codeyarn commit
: Commit using conventional commit style (husky will tell you to use it if you haven't 😉)