yufrontin
lightweight yaml front matter extractor using yaml.js
The core of yaml.js is included within the lib directory. I did not feel the need to use the entire repo as a dependency when I would only use the core. This keeps the size of the project small. License file for yaml.js is included.
Installation
$ npm install yufrontin
Usage
// results in --> data: title: 'me' content: 'Hello World' data: {} content: 'Hello World'
or you could do this:
var fs = var parsefm = var file = fs
API
yufrontin(inputString)
- inputString [String] data to be parsed by yaml.js
- return [Object]
Why?
Why another yaml front matter extractor? I wanted to try yaml.js.
See Also
- parse-yuf: read in a file to be parsed by yufrontin returning an extended results or output from yaml.js
- gray-matter: My all time favorite YAML front matter parser before yufrontin.
- front-matter-extractor: the code base which yufrontin is shamelessly based on.
- yamljs: yaml engine used here.