Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 492 Bytes

File metadata and controls

23 lines (18 loc) · 492 Bytes

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()