v0.9.6
#263 - This release adds alternative signatures for Model#start
and Model#on
that don't use var-args.
The changes are backwards-compatible, and there are no current plans to remove the legacy signatures. New code should use the new signatures where possible.
Model#start
now supports a new array format for input paths:
model.start(outPath, inPath1, inPath2, ..., fn); // Old
model.start(outPath, [inPath1, inPath2, ...], fn); // New
Model#on
has a new{useEventObjects: boolean}
option. If true, it calls the listener with anEvent
object and the wildcard-captured segments as an array:
// Old
model.on('change', 'foo.**', (captures..., value, previous, passed) => {
});
// New
model.on('change', 'foo.**', {useEventObjects: true}, (changeEvent, captures) => {
const {type, value, previous, passed} = changeEvent;
});