funfix-exec
TypeScript icon, indicating that this package has built-in type declarations

7.0.1 • Public • Published

funfix-exec

Join chat npm

Sub-project of Funfix containing low level, side-effectful utilities and data types for building higher level concurrency tools.

Documentation

Links:

Usage

You can depend on the whole funfix library, by adding it to package.json:

npm install --save funfix

In this case imports are like:

import { Future } from "funfix"

Or for finer grained dependency management, the project can depend only on funfix-exec:

npm install --save funfix-exec

In this case imports are like:

import { Future } from "funfix-exec"

Usage sample:

import { Future } from "funfix"
 
const f1 = Future.of(() => "hello")
const f2 = Future.of(() => "world")
 
const greeting = Future.map2(f1, f2, (a, b) => a + " " + b)
 
greeting.onComplete(r => {
  r.fold(console.error, console.info)
})

Modules: UMD and ES 2015

The library has been compiled using UMD (Universal Module Definition), so it should work with CommonJS and AMD.

But it also provides a module definition in package.json, thus providing compatibility with ECMAScript 2015 modules, for usage when used with a modern JS engine, or when bundling with a tool chain that understands ES2015 modules, like Rollup or Webpack.

License

Licensed under the Apache License, Version 2.0.

Package Sidebar

Install

npm i funfix-exec

Weekly Downloads

1,065

Version

7.0.1

License

Apache-2.0

Unpacked Size

985 kB

Total Files

55

Last publish

Collaborators

  • alexelcu