async-fp
TypeScript icon, indicating that this package has built-in type declarations

9.0.13 • Public • Published

async-fp

NPM version NPM downloads Bundle size

Codecov

Collection of utilities for asynchronous functional programming.

Installation

# npm
npm install async-fp

# yarn
yarn add async-fp

# pnpm
pnpm install async-fp

#rush
rush add -p async-fp

AsyncContext

import { AsyncContext } from 'async-fp'

const context = new AsyncContext(async () => ({ config: 'async value' }))

await context.get() // => { config: 'async value' }

asyncAssert

import { asyncAssert } from 'async-fp'

const value = await asyncAssert(Promise.resolve({ a: 1 }), v => {
  if (v.a === 1) throw new Error('not accepting 1')
})

/async-fp/

    Package Sidebar

    Install

    npm i async-fp

    Weekly Downloads

    5

    Version

    9.0.13

    License

    MIT

    Unpacked Size

    15.3 kB

    Total Files

    37

    Last publish

    Collaborators

    • unional