【文件属性】:
文件名称:edit-json-file:轻松编辑json文件
文件大小:12KB
文件格式:ZIP
更新时间:2021-05-07 21:43:16
hacktoberfest JavaScript
编辑json文件
轻松编辑json文件。
:cloud: 安装
# Using npm
npm install --save edit-json-file
# Using yarn
yarn add edit-json-file
:clipboard: 例子
const editJsonFile = require ( "edit-json-file" ) ;
// If the file doesn't exist, the content will be an empty object by default.
let file = editJsonFile ( ` ${ __dirname } /foo.json` ) ;
// Set a couple of fields
file . set ( "planet" , "Earth" ) ;
file . set ( "city\\.name" , "an
【文件预览】:
edit-json-file-master
----DOCUMENTATION.md(3KB)
----lib()
--------index.js(6KB)
----CONTRIBUTING.md(3KB)
----example()
--------.gitignore(9B)
--------index.js(1KB)
----LICENSE(1KB)
----README.md(11KB)
----.gitignore(80B)
----package-lock.json(2KB)
----package.json(1KB)