Nasty Popsicle Machine

    store-data
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.0 • Public • Published

    store-data

    JavaScript Style Guide npm Build Status Dependency DevDependency Coverage Status

    NPM

    Finally, the simplest way to store data

    Install

    npm i store-data
    

    Example

    const Store = require('store-data')
    
    const users = new Store({
      save: false
    })
    
    users.setSync('user123', {
      name: 'Jimi',
      dev: true
    })
    
    console.log(users.getSync('user123'))
    // { name: 'Jimi', dev: true }

    or

    const Store = require('store-data')
    
    const users = new Store({
      save: false
    })
    
    users.set('user123', {
      name: 'Jimi',
      dev: true
    }).then(() => {
      users.get('user123').then(value => {
        console.log(value)
        // { name: 'Jimi', dev: true }
      })
    })

    Docs

    All functions are documented with jsdoc on store-data website.

    Contribute

    Feel free to fork and make pull requests

    License

    MIT

    Install

    npm i store-data

    DownloadsWeekly Downloads

    35

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    10.2 kB

    Total Files

    5

    Last publish

    Collaborators

    • itsjimi