Skip to content

Commit

Permalink
3.1.0
Browse files Browse the repository at this point in the history
fixes #43
  • Loading branch information
jonschlinkert committed Oct 19, 2017
1 parent ba1223c commit 11302db
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions examples/cache.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// https://github.com/jonschlinkert/gray-matter/issues/43
var frontMatter = require('gray-matter');

var docs = [
{
id: 1,
content: ''
},
{
id: 2,
content: ''
}
];

var parsedDocs = docs.map(doc => {
var output = frontMatter(doc.content);
Object.assign(output, { id: doc.id });
return output;
}).map(({ id }) => id);
console.log(parsedDocs);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gray-matter",
"description": "Parse front-matter from a string or file. Fast, reliable and easy to use. Parses YAML front matter by default, but also has support for YAML, JSON, TOML or Coffee Front-Matter, with options to set custom delimiters. Used by metalsmith, assemble, verb and many other projects.",
"version": "3.0.8",
"version": "3.1.0",
"homepage": "https://github.com/jonschlinkert/gray-matter",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
Expand Down

0 comments on commit 11302db

Please sign in to comment.