/statelog

eventbased logger based on new Proxy() to track changes of objects and arrays

Primary LanguageJavaScriptMIT LicenseMIT

statelog NPM version Build Status Coverage Status Dependency status Dev Dependency status

This lib adds events to objects which are triggered when something changes

  const obj = stateLog.create({foo: 'bar'});

  obj.__stateLog__.on('set.foo', () => {
    console.log('gets triggered when foo changes');
  });

  obj.foo = 'barbar';