magic-status
v1.0.3
Published
a status object with getter/setter properties
Downloads
9
Readme
an automatic status object. First you define properties with default values, add a callback function, give a wait time, returns a status object, setting the properties will now result in the cb being called after wait time, only with the updated properties.
todo: make option to always send all
status = ms({
asd: 5,
hoi: 'daag',
foo: 'bar',
bar: 'baz'
}, console.log.bind( console, 'update :' ), 3000 );
status.hoi; // 5
status.hoi = 3;
// update: { hoi: 3 }```