gray-matter-editor
v1.0.0
Published
an esay way to edit gray-matter-data in nodejs
Readme
gray-matter-editor
an esay way to edit gray-matter-data in nodejs
Install
Install with npm:
$ npm install --save gray-matter-editorChangeLog
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 = '---'}
