json-feed

    2.0.0 • Public • Published

    json-feed

    A distributed live-updating JSON.

    npm i json-feed

    Synopsis

    In one process:

    var JSONFeed = require('json-feed')
     
    var obj = new JSONFeed('./feed')
    obj.open(function () {
      obj.set({foo: 'bar'})
      console.log(obj.key.toString('hex'))
    })

    In another process:

    var obj = new JSONFeed('./another-feed', '<KEY FROM ABOVE>')
    obj.on('update', function (value) {
      console.log(value) // === {foo: 'bar'}
    })

    License

    MIT

    Install

    npm i json-feed

    DownloadsWeekly Downloads

    15

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • poga