ssb-mentions
extract the mentions in a ssb message, just using the markdown. this is _mostly compatible_ with the way patchwork does it. but simpler, because it relies only on the markdown.
Last updated 9 months ago by christianbundy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ssb-mentions 
SYNC missed versions from official npm registry.

ssb-mentions

extract the mentions in a ssb message, just using the markdown. this is mostly compatible with the way patchwork does it. but simpler, because it relies only on the markdown.

var mentions = require('ssb-mentions')

var ary = mentions(markdown, opts)

options

  • bareFeedNames (boolean, default false): if true, include stub mention objects for bare feed name mentions, in the format {name: "NAME", link: "@"}. these can then have the link filled in with a feed id, to make a "patchwork-style mention", or be removed from the mentions array before publishing.
  • emoji (boolean, default false): if true, include emoji in the mentions array, in the form {name: "NAME", emoji: true}.

License

MIT

Current Tags

  • 0.5.2                                ...           latest (9 months ago)

13 Versions

  • 0.5.2                                ...           9 months ago
  • 0.5.1                                ...           a year ago
  • 0.5.0                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
  • 0.0.0                                ...           5 years ago

Copyright 2014 - 2016 © taobao.org |