1
1
mirror of https://github.com/primer/css.git synced 2025-01-06 05:33:07 +03:00
css/docs/lib/write-meta.js
2018-12-17 15:26:50 -08:00

12 lines
284 B
JavaScript

const matter = require('gray-matter')
const each = require('./each')
module.exports = function writeMeta({namespace = 'data'}) {
return each(file => {
const data = file[namespace]
if (data) {
file.contents = matter.stringify(String(file.contents), data)
}
})
}