1.0.1 • Published 9 years ago
dom-cursor-stream v1.0.1
dom-cursor-stream
dom-cursor-stream
is a module that wraps up DOMCursor objects in readable streams.
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()
}))