JavaScript mixin to make objects observable