Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ssb-msg-content

ssbc35.9kMIT1.0.1

USAGE: common-readme [-r|--repo REPO-NAME] [-l|--license LICENSE]

readme

ssb-msg-content

Take an ssb message object and grab just the content

Usage

var getContent = require('ssb-msg-content')

var content = getContent(msg)

where msg could be of form:

  • { key, value } - often provided by feed streams
  • { author, content, timestamp } - the raw value as provided by e.g. sbot.get
  • { type, ... } - you are already looking at the content!

outputs

{
  type: String,
  ...otherProps
}