Separate front-matter from content
$ npm install -g front-matter-extractor
var fme = require"front-matter-extractor";var extracted = fmeextractinput;
input is a string containing:
--- title: something date: 2013-10-20 words: - this - that --- blah blah blah
extracted to the following object:
title: "something"date: Mon Oct 20 2013 00:00:00 GMT+0000 GMTwords: 'this' 'that'_remainder: "blah blah blah"