1.0.0 • Published 3 years ago
gray-matter-editor v1.0.0
gray-matter-editor
an esay way to edit gray-matter-data in nodejs
Install
Install with npm:
$ npm install --save gray-matter-editor
ChangeLog
Please see the changelog
Warning
Usage
const editor = require('gray-matter-editor');
editor($FILE_PATH, (data) => ({
...data,
author: 'yrobot',
}));
before | after |
---|---|
API
Params
path
{String}: file pathtransform-hook
{Function: Object => Object}: oldData=>newData, call with old matter-data, return new matter-dataoptions
{Object} {delims = '---'}
1.0.0
3 years ago