strip-yfm

Strip YAML front matter from files.

strip-yfm

The best project ever.

To install the module, run the following in the command line:

npm i strip-yfm --save

Use within your application with the following line of JavaScript:

var yfm = require('strip-yfm');

Type: Object Default: {start: '---', end: '---'}

The starting and ending delimiters that are used before and after the YAML front matter.

For example:

var yfm = require('strip-yfm');
var delimiters = {
  start: '/*---',
  end: '---*/'
};
var file = require('fs').readFileSync('my-file.hbs', 'utf8');
 
var strippedFile = yfm.strip(file, delimiters);

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][].

Jon Schlinkert

  • helpers: some great handlebars helpers that we decided not to include in the handlebars-helpers project, most likely because the code footprint was too big or the helper wasn't generic enough.

Copyright (c) 2013 Jon Schlinkert, contributors. Released under the MIT license


This file was generated on Friday, October 11, 2013.