ghaction-github-pages/node_modules/fs-extra/lib/json/output-json.js

13 lines
272 B
JavaScript
Raw Normal View History

2019-11-15 23:20:34 +08:00
'use strict'
2020-03-23 17:00:06 +08:00
const { stringify } = require('jsonfile/utils')
const { outputFile } = require('../output')
2019-11-15 23:20:34 +08:00
2020-03-23 17:00:06 +08:00
async function outputJson (file, data, options = {}) {
const str = stringify(data, options)
2019-11-15 23:20:34 +08:00
2020-03-23 17:00:06 +08:00
await outputFile(file, str, options)
2019-11-15 23:20:34 +08:00
}
module.exports = outputJson