Natural Performance Manager
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

dom-value-stream

0.0.1 • Public • Published

dom-value-stream

Transform a stream of DOMEvents to the values they represent (in the case of inputs).

var events = require('dom-event-stream')
  , values = require('dom-value-stream')
 
events(document.querySelector('#source'), 'keyup')
  .pipe(values())
  .pipe(output())
 

API

values(placeholder='') -> ValueTransform

Returns a transform stream that translates DOMEvents into values over time (it looks at ev.target.value).

If ev.target.value is null or undefined, placeholder is emitted instead. This will be an empty string if not given as a parameter.

License

MIT

Keywords

none

Install

npm i dom-value-stream

DownloadsWeekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • avatar