JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q28874F

JavaScript library providing Maybe, Either, and Promise objects

Package Exports

  • bassline

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bassline) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Bassline

Bassline is a JavaScript library that exposes two primary types, maybe and either. The maybe type may be used to model an optional value. The constructor functions nothing and just create a maybe. The either type is used to represent values with two possibilities. The constructor functions left and right create such values.

Installation

  • Install Bassline with NPM

      npm install bassline

Getting Started: Hello World

var bassline = require("bassline")
  , just = bassline.just;

console.log(just("Hello").fmap(function(a){return a + " World";}).get);

$ node hello.js
Hello World