gray-matter
Advanced tools
Comparing version 3.0.5 to 3.0.6
@@ -6,3 +6,3 @@ 'use strict'; | ||
if (typeof engine === 'undefined') { | ||
throw new Error(`gray-matter engine "${name}" is not registered`); | ||
throw new Error('gray-matter engine "' + name + '" is not registered'); | ||
} | ||
@@ -9,0 +9,0 @@ if (typeof engine === 'function') { |
'use strict'; | ||
var yaml = require('js-yaml'); | ||
/** | ||
* Default engines | ||
*/ | ||
var engines = exports = module.exports; | ||
@@ -5,0 +10,0 @@ |
@@ -10,5 +10,5 @@ 'use strict'; | ||
if (typeof engine.parse !== 'function') { | ||
throw new TypeError(`expected "${language}.parse" to be a function`); | ||
throw new TypeError('expected "' + language + '.parse" to be a function'); | ||
} | ||
return engine.parse(str, opts); | ||
}; |
@@ -35,3 +35,3 @@ 'use strict'; | ||
if (typeof engine.stringify !== 'function') { | ||
throw new TypeError(`expected "${language}.stringify" to be a function`); | ||
throw new TypeError('expected "' + language + '.stringify" to be a function'); | ||
} | ||
@@ -38,0 +38,0 @@ |
@@ -8,3 +8,3 @@ 'use strict'; | ||
/** | ||
* Cast `val` to an array. | ||
* Returns true if `val` is a buffer | ||
*/ | ||
@@ -17,3 +17,3 @@ | ||
/** | ||
* Cast `val` to an array. | ||
* Returns true if `val` is an object | ||
*/ | ||
@@ -26,3 +26,3 @@ | ||
/** | ||
* Cast `val` to an array. | ||
* Cast `input` to a buffer | ||
*/ | ||
@@ -38,3 +38,3 @@ | ||
/** | ||
* Cast `val` to an array. | ||
* Cast `val` to a string. | ||
*/ | ||
@@ -61,3 +61,3 @@ | ||
/** | ||
* Return true if the givne string starts with the specified substring | ||
* Returns true if `str` starts with `substr`. | ||
*/ | ||
@@ -64,0 +64,0 @@ |
{ | ||
"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.5", | ||
"version": "3.0.6", | ||
"homepage": "https://github.com/jonschlinkert/gray-matter", | ||
@@ -36,2 +36,5 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
}, | ||
"browser": { | ||
"fs": false | ||
}, | ||
"dependencies": { | ||
@@ -38,0 +41,0 @@ "js-yaml": "^3.8.1", |
@@ -204,3 +204,3 @@ # gray-matter [![NPM version](https://img.shields.io/npm/v/gray-matter.svg?style=flat)](https://www.npmjs.com/package/gray-matter) [![NPM monthly downloads](https://img.shields.io/npm/dm/gray-matter.svg?style=flat)](https://npmjs.org/package/gray-matter) [![NPM total downloads](https://img.shields.io/npm/dt/gray-matter.svg?style=flat)](https://npmjs.org/package/gray-matter) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/gray-matter.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/gray-matter) | ||
Stringify an object to YAML or the specified language, and append it to the given string. By default, only YAML and JSON can be stringified. See the [engines](#optionsengines) section to learn how to stringify other languages. | ||
Stringify an object to YAML or the specified language, and append it to the given string. By default, only YAML and JSON can be stringified. See the [engines](#engines) section to learn how to stringify other languages. | ||
@@ -468,3 +468,3 @@ **Params** | ||
| --- | --- | | ||
| 142 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| 151 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| 7 | [RobLoach](https://github.com/RobLoach) | | ||
@@ -476,3 +476,5 @@ | 5 | [heymind](https://github.com/heymind) | | ||
| 1 | [Ajedi32](https://github.com/Ajedi32) | | ||
| 1 | [caesar](https://github.com/caesar) | | ||
| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | | ||
| 1 | [zachwhaley](https://github.com/zachwhaley) | | ||
@@ -511,2 +513,2 @@ ### Building docs | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 19, 2017._ | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 14, 2017._ |
32251
455
510