value-event handler that transmits input selection state
Install
$ npm install --save selection-event
Usage
var selectionEvent = var h = var vtree = // handler({selection: {start, end}})
API
selectionEvent(handler, [data])
-> function
handler
Required
Type: function
Arguments: data
A function called with the selection (and custom) data any time the configured event fires.
selection: start: 1 end: 3 // ...
data
Type: object
Default: {}
Additional custom data to extend the default {selection}
object.
License
MIT © Ben Drucker