Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

remark-yaml-meta

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-yaml-meta

Extract YAML front-matter from markdown.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

remark-yaml-meta

Extract YAML front-matter from markdown.

Installation

npm:

npm install remark-yaml-meta

Usage

Dependencies:

var remark = require('remark');
var metaPlugin = require('remark-yaml-meta');

Process:

var file = remark().use(metaPlugin).process([
    '---',
    'foo:',
    '  bar: true',
    '---',
    ''
].join('\n'));

Yields:

{
  "foo": {
    "bar": true
  }
}

API

remark.use(yamlConfig)

Passes the configuration at the remark field as parse and stringify settings.

Just like remark-yaml-config, but the parsed object is saved to the meta property of the retuned VFile.

License

MIT © Chris Gomez

Keywords

yaml

FAQs

Package last updated on 30 Jun 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