Socket
Socket
Sign inDemoInstall

mkmsg

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkmsg

Message injection


Version published
Weekly downloads
28
increased by833.33%
Maintainers
1
Weekly downloads
 
Created
Source

Message

Build Status npm version Coverage Status

Append or prepend a message

By default appends a message to a stream, use the message option to change the message; to prepend set the prepend option.

When no message is given the default generator message is used.

Install

npm i mkmsg --save

For the command line interface install mkdoc globally (npm i -g mkdoc).

Usage

Create the stream and write a commonmark document:

var msg = require('mkmsg')
  , ast = require('mkast');
ast.src('This is a markdown paragraph.')
  .pipe(msg())
  .pipe(ast.stringify({indent: 2}))
  .pipe(process.stdout);

Help

mkmsg [options]

Message injection.

  -m, --message=[MSG]  Custom message, parsed as markdown
  -p, --prepend        Prepend message to the stream
  -h, --help           Display this help and exit
  --version            Print the version and exit

Report bugs to https://github.com/mkdoc/mkmsg/issues

API

msg

msg([opts][, cb])

Append or prepend a message string.

The message string is parsed as markdown and written to the end of the document unless prepend is given.

The document node itself is omitted; it's content nodes are written to the stream.

Returns an output stream.

  • opts Object processing options.
  • cb Function callback function.
Options
  • input Readable input stream.
  • output Writable output stream.
  • message String markdown message.
  • prepend Boolean prepend message to the stream.

License

MIT

Generated by mkdoc.

Keywords

FAQs

Package last updated on 21 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc