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

    Install

    npm i wrapper-types

    DownloadsWeekly Downloads

    14

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    39.7 kB

    Total Files

    17

    Last publish

    Collaborators

    • lfaudreejr