0.1.2 • Published 10 years ago

rx-map v0.1.2

Weekly downloads
17
License
-
Repository
-
Last release
10 years ago

Rx Map

An Rx based map implementation

Example

var Rx    = require("rx");
var RxMap = require("rx-map");

var map = new RxMap();

map.subscribe(function(data) {
    console.log("map updated: " + data.key + " => " + data.value);
});

map.set("morning", "coffee");
map.set("afternoon", "espresso");
map.set("night", "tea");

map.get("morning").subscribe(console.log);

map.getOrElse("yesterday", function() {
    return Rx.Observable.returnValue("nothing");
}).subscribe(console.log);

map.putIfAbsent("yesterday", function() {
    return Rx.Observable.returnValue("beer");
}).subscribe(console.log);
0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago