parse-yuf
Parse front matter extracted from yufrontin
Installation
$ npm install parse-yuf
Usage
file: kmx/test/one.hbs
---title: onelayout: defaultdescription: This is a test. This is only a testtags: ['apple', 'orange', 'pear']--- This is one.
extended options: sync and async versions
var parsefm = var syncExtend = parsefmconsole// or // results in --> abs: '/Volumes/BigStor/Developer/web/sites/testproj949/kmx/test/one.hbs' rel: 'kmx/test/one.hbs' file: root: 'testproj949' dir: 'kmx/test' base: 'one.hbs' ext: '.hbs' name: 'one' stats: dev: 16777242 mode: 33188 nlink: 1 uid: 501 gid: 20 rdev: 0 blksize: 4096 ino: 3441487 size: 137 blocks: 16 atime: Thu Sep 17 2015 09:22:26 GMT- mtime: Tue Sep 15 2015 12:33:08 GMT- ctime: Tue Sep 15 2015 12:33:08 GMT- birthtime: Tue Sep 01 2015 17:02:30 GMT- data: title: 'one' layout: 'default' description: 'This is a test. This is only a test' tags: 'apple' 'orange' 'pear' content: '\nThis is one.\n'
vanilla readFile sync and async versions:
var syncPlain = parsefmconsole// or // results in --> data: title: 'one' layout: 'default' description: 'This is a test. This is only a test' tags: 'apple' 'orange' 'pear' content: '\nThis is one.\n'