most-mutation

0.0.1 • Public • Published

most-mutation

Event Stream from Mutation Observer

npm install most-mutation

import mutationStream from 'most-mutation'
 
const options = {
    attributes: true,
    childList: true,
    characterData: data,
    // this is passed directly to the mutation observer so you can add
    // all the options you can pass to observer.observe
  }
 
const changes = mutationStream(document.body, options)
 
// you get back a most stream
changes
  .tap(console.log)
  .drain()

Package Sidebar

Install

npm i most-mutation

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • galileopy