wrapper-types

0.2.0 • Public • Published

Node.js Package Coverage Status

Wrapper-Types

Installation

npm install wrapper-types

Usage

Require the whole module:

const wrappers = require('wrapper-types')

Require types individually:

const { IO, Identity } = require('wrapper-types')

Identity

const { identity } = require('wrapper-types')

const identity = Identity.of(2)

Methods: map, chain, ap, extend, extract, equals, of, is, toString

IO

const { IO } = require('wrapper-types')

const io = IO.of(window)

Methods: map, chain, ap, run, of, is, toString

Maybe

const { Maybe } = require('wrapper-types')

const maybe = Maybe.of(2)

Methods: map, chain, ap, extend, extract, isNothing, of, is, toString

Task

const { Task } = require('wrapper-types')

const task = Task((rej, res) => doAsync().then(res).catch(rej))

Methods: map, chain, ap, fork, of, is, toString

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    0
  • 0.1.4
    0
  • 0.1.3
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i wrapper-types

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

39.7 kB

Total Files

17

Last publish

Collaborators

  • lfaudreejr