non-memory-map
v1.0.3
Published
A persistent map that does not use much RAM
Downloads
3
Readme
node-non-memory-map
A map object that doesn't use RAM: for really large big huge amounts of data
Installation:
npm install non-memory-map --save
Example Usage:
import {NonMemoryMap} from "non-memory-map";
let map = new NonMemoryMap({
path: __dirname,
size: 2 * 1024 * 1024 // 2 MB
})
map.set("isBananaGreat",true)
map.set("bananaData",{
color: "yellow",
isAwesome: true,
bananaLordData: {
name: "swadical",
isAwesome: "maybe"
}
})
console.log(map.get("isBananaGreat")) // -> "true"
console.log(map.get("bananaData").get("color")) // -> "yellow"
console.log(map.get("bananaData").get("bananaLordData").get("name")) // -> "swadical"