front-matter-extractor

1.1.0 • Public • Published

view on npm npm module downloads per month Dependency Status Analytics

front-matter-extractor

install:

$ npm install -g front-matter-extractor

this code:

var fme = require("front-matter-extractor");
var extracted = fme.extract(input);

where input is a string containing:

---
title: something
date: 2013-10-20
words:
    - this
    - that
---
blah blah blah

sets extracted to the following object:

{
    title: "something",
    date: Mon Oct 20 2013 00:00:00 GMT+0000 (GMT),
    words: [ 'this', 'that' ],
    _remainder: "blah blah blah"
}

Readme

Keywords

none

Package Sidebar

Install

npm i front-matter-extractor

Weekly Downloads

15

Version

1.1.0

License

none

Last publish

Collaborators

  • 75lb