Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethul/bassline
https://github.com/ethul/bassline
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ethul/bassline
- Owner: ethul
- License: mit
- Created: 2012-01-07T21:55:07.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-02-12T03:09:28.000Z (almost 13 years ago)
- Last Synced: 2024-09-13T20:18:46.649Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```javascript
var bassline = require("bassline")
, just = bassline.just;console.log(just("Hello").fmap(function(a){return a + " World";}).get);
$ node hello.js
Hello World
```