Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Store data in a file
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
.gitignore
LICENCE
README.md
index.js
package.json
temp.txt

README.md

file-store

Store data in a file

Example

var FileStore = require("file-store")
    , store = FileStore("temp.txt")

store.get("key", function (err, value) {
    console.log("value at key", value)
})

store.push("array-key", "array-value", function (err) {
    console.log("pushing a value into an array")
})

store.set("key", { some: "value" }, function (err) {
    console.log("setting value at key")
})

store.remove("array-key", "array-value", function (err) {
    console.log("removing a value from an array")
})

store.delete("key", function (err) {
    console.log("deleting the value at the key")
})

Installation

npm install file-store

Contributors

  • Raynos

MIT Licenced

Something went wrong with that request. Please try again.