1.0.3 • Published 8 years ago

non-memory-map v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

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"