rx-map

0.1.2 • Public • Published

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);
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    16
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    16
  • 0.1.1
    20
  • 0.1.0
    1

Package Sidebar

Install

npm i rx-map

Weekly Downloads

35

Version

0.1.2

License

none

Last publish

Collaborators

  • josephmoniz