1.0.1 • Published 9 years ago

dom-cursor-stream v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

dom-cursor-stream

dom-cursor-stream is a module that wraps up DOMCursor objects in readable streams.

Build status

install

$ npm install dom-cursor-stream

usage

var readable = require('dom-cursor-stream')
var through = require('through2')
var cursor = navigator.mozContacts.getAll()

readable(cursor)
  .on('error', console.error.bind(console))
  .pipe(through.obj(function (contact, enc, next) {
    console.log('contact:', contact.name.join('\n'))
    next()
  }))