npm.io
1.5.0 • Published 6 years ago

@blueghost/moonad

Licence
MIT
Version
1.5.0
Deps
0
Size
93 kB
Vulns
0
Weekly
0
Stars
1
DeprecatedThis package is deprecated

Moonad

GitHub Workflow Status (branch) Code Climate coverage Code Climate maintainability Code Climate technical debt

npm bundle size npm npm npm type definitions

pkgreview.dev Package Ratings

Typed Functional Utility Library for TypeScript

moonad brings to the table well-known patterns and features from strongly typed functional languages to TypeScript

import { Lazy } from "./Lazy"

const lazyApplier = Lazy.lazy(() => (x: number) => x * 2)

const lazyVal = Lazy.lazy(() => 3)
    .apply(lazyApplier)
    .map(x => x + 1)

console.log(lazyVal.value) // 7
Installation

To install the stable version:

npm i @blueghost/moonad
Using moonad

To use moonad simply use the following import syntax:

import { Lazy } from "@blueghost/moonad"
Documentation

You can find the automatically generated changelog here

The documentation in markdown format can be found here

Contributing

To contribute, check the contribution guide here

Licence

moonad uses the MIT licence

Keywords