Giter VIP home page Giter VIP logo

json-storage-fs's Introduction

json-storage-fs - Simple key-value storage based on JSON for Node.js

npm package

Installation

$ npm install json-storage-fs

Simple to use

json-storage-fs is a very lightweight package with no dependencies that was designed for small Node.js applications

Example:

const Storage = require('json-storage-fs');

Storage.set('name', 'Alice');
const name = Storage.get('name');
console.log(name); // -> 'Alice'

API

Get value from key

static get(key: string): any|undefined

Set value

static set(key: string, data: any): void

Delete value by key

static delete(key: string): void

Get all high-level keys

static getAllKeys(): string[]

Clear storage

static clearAll(): void

json-storage-fs's People

Contributors

lapkoshka avatar metaspartan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.