JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q23731F
  • License ISC

Sink ssb-review streams into mutant arrays

Package Exports

  • collect-mutations

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (collect-mutations) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

collect-mutations

A pull-stream sink for mutation streams coming from ssb-review-level

If you want to display a set of ssb messages and want them to update in realtime, this is your friend.

const collectMutations = require('collect-mutations')
const MutantArray = require('mutant/array')
const mmap = require('mutant/map')

const messages = MutantArray()

pull(
  ssb.revisions.messagesByType('post'),
  collectMutations(messages, err  => console.error(err))
)

document.body.appendChild(
  h('ul', mmap(messages, kv => h('li', kv.value.content.text)))
)

See Also:

License: ISC