gray-matter
Advanced tools
Comparing version 1.2.2 to 1.2.3
15
.verb.md
@@ -55,2 +55,17 @@ # {%= name %} {%= badge("fury") %} | ||
## options.parser | ||
Type: `Function` | ||
Default: `undefined` | ||
Pass a custom parser on the options. This is useful if you need to, for example, define custom schemas for [js-yaml]. | ||
**Example** | ||
```js | ||
matter(str, { | ||
parser: require('js-yaml').safeLoad | ||
}); | ||
``` | ||
## options.eval | ||
@@ -57,0 +72,0 @@ Type: `Boolean` |
@@ -40,3 +40,3 @@ /** | ||
parser.yaml = function(str, options) { | ||
var opts = extend({strict: false, saftLoad: false}, options); | ||
var opts = extend({strict: false, safeLoad: false}, options); | ||
try { | ||
@@ -43,0 +43,0 @@ var YAML = parser.requires.yaml || (parser.requires.yaml = require('js-yaml')); |
{ | ||
"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.", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Jon Schlinkert", |
@@ -112,2 +112,17 @@ # gray-matter [![NPM version](https://badge.fury.io/js/gray-matter.svg)](http://badge.fury.io/js/gray-matter) | ||
## options.parser | ||
Type: `Function` | ||
Default: `undefined` | ||
Pass a custom parser on the options. This is useful if you need to, for example, define custom schemas for [js-yaml]. | ||
**Example** | ||
```js | ||
matter(str, { | ||
parser: require('js-yaml').safeLoad | ||
}); | ||
``` | ||
## options.eval | ||
@@ -288,3 +303,3 @@ Type: `Boolean` | ||
_This file was generated by [verb](https://github.com/assemble/verb) on February 06, 2015._ | ||
_This file was generated by [verb](https://github.com/assemble/verb) on February 12, 2015._ | ||
@@ -291,0 +306,0 @@ |
89743
78
1890
309
27