probe

Observable Providence cursors

probe

Probe extends Providence to add observation capabilities.

$ npm install --save probe

Probe extends Providence constructor. See relevant Providence API docs: https://github.com/dashed/providence

Add listener to listen for any changes at this Probe object's keypath. Be aware that observation isn't scoped to the root data; only at keypath.

listener function would be added to a lookup table that is shared among all Probe objects that inherit it.

Shorthand for Probe.prototype.on('any', listener)

Remove observer at this Probe object's keypath.

Shorthand for Probe.prototype.removeListener('any', listener)

Add listener that'll be called whenever relevant event occurs at keypath.

event may be one of: any, update, swap, add, remove, delete

listener function would be added to a lookup table that is shared among all Probe objects that inherit it.

Return unsubcribe function that may be called at most once; since it's associated with .on(), which was called.

Add a listener that's only called once when event occurs.

event may be one of: any, update, swap, add, remove, delete

Return unsubcribe function that may be called at most once; since it's associated with .on(), which was called. Once listener has been called, the unsubcribe function will be defunct; and calling it has no effect.

Remove listener, if it exists, from event. If the same listener is observing another event at the same keypath, that listener will not be removed.

event may be one of: any, update, swap, add, remove, delete

Returns this for chaining.

Remove all listeners, if any, from event.

event may be one of: any, update, swap, add, remove, delete

Returns this for chaining.

MIT