Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
tonic + npm: gray-matter
node v6.17.1
version:
master
endpoint
share
tweet
const gm = require("gray-matter") const assert = require("assert"); const input = `--- title: test --- hello there`; const inputParsed = gm(input); const output = gm.stringify(inputParsed.content, inputParsed.data); console.log('input:'); console.log(input); console.log('output:'); console.log(output); assert(input === output);
Note the extra `\n` added
Created from: https://tonicdev.com/npm/gray-matter
Loading…
no comments
sign in
to comment