twixt-mutant

0.0.3 • Public • Published

twixt-mutant Function

var Mutant = require("twixt-mutant"),
    obj = {};

Mutant(obj).addEventListener("mutate", function(evt) {
    var was, is;
    
    for (var prop in evt.mutations) {
        was = evt.mutations[prop];
        is = this[prop];
        console.log(prop, "changed from", was, "to", is);
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i twixt-mutant

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • rremer