1.0.2 • Published 1 year ago

@dankreiger/puppy-fp v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

puppy-fp

For puppies that are afraid of the outside world.

Documentation

Documentation

License

MIT

Installation

Install with npm

  npm install puppy-fp

Badges

Add badges from somewhere like: shields.io

npm iife MIT License

Usage/Examples

Standalone

import { taskify } from 'puppy-fp';

const longRunningTask = () =>
  new Promise((resolve) => setTimeout(resolve, 1000));

const runTask = taskify(longRunning);
await runTask(); // takes ca. 1000ms

await runTask(); // runs immediately (result is memoized)

Integrated with fp-ts or any other library with a Task implementation

TODO:

  • Add more functions