Watch.JS
Watch.JS copied to clipboard
attr1 and attr2 both change that function can be invoked
Is this feature in Watch JS? for example:
var a = { attr1: a, attr2: b }
watch(a, ['attr1', 'attr2'], function(){
})
a.attr1 = aa;
a.attr2 = bb;
I want when attr1 and attr2 both change that the function can be invoked.
Does Watch JS support this?
I must do the same in project I'm working on.
I think simplest workaround would be to use underscore debounce function with small wait time, like 20ms
Sadly we don't have this feature, really useful but hard to implement.