0.1.5 • Published 5 years ago

managed-object-proxy v0.1.5

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

managed-object-proxy

Build Status

What is it?

A managed object proxy that allows you listen to all changes in the object, including child object.

Quick start

import Watchable from "managed-object-proxy";

const proxy = new Watchable();
const obj = proxy.init({});

const listener = (v, where) => {
  if (typeof v === "object") {
    console.log(`> ${JSON.stringify(v)} @ ${where}`);
  } else {
    console.log(`> ${v} @ ${where}`);
  }
});

proxy.registerTrigger(listener);

// starting from here feel free to make any changes to the object.

proxy.unregisterTrigger(listener);

Documents

We currently not offering documents. To understand APIs please read the source code, it's not a large file.

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago