Nibbling Pastry Monster

    observ-varhash

    1.0.8 • Public • Published

    observ-varhash build status

    An object with observable key value pairs that can be added and removed

    Example

    An ObservVarhash is a version of observ-struct that allows adding and removing keys. Mutation of an observable element in the hash will cause the ObservVarhash to emit a new changed plain javascript object.

    var ObservVarhash = require("observ-varhash")
    var Observ = require("observ")
     
    var people = ObservVarhash({jack: 'Jack'}, function create (obj, key) {
      return Observ(obj)
    })
     
    people.put('diane', 'Diane')
     
    console.log(people())
    // plain javascript object {jack: 'Jack', diane: 'Diane'}

    Installation

    npm install observ-varhash

    Contributors

    • Nicholas Westlake

    API based on observ-struct

    MIT Licenced

    Keywords

    none

    Install

    npm i observ-varhash

    DownloadsWeekly Downloads

    283

    Version

    1.0.8

    License

    none

    Last publish

    Collaborators

    • nrw