node-jsonfile:轻松读写JSON文件

时间:2021-04-13 08:07:39
【文件属性】:
文件名称:node-jsonfile:轻松读写JSON文件
文件大小:13KB
文件格式:ZIP
更新时间:2021-04-13 08:07:39
JavaScript Node.js-json文件 在Node.js中轻松读取/写入JSON文件。 注意:该模块不能在浏览器中使用。 为什么? 将JSON.stringify()以及fs.writeFile()和JSON.parse()以及try/catch块中包含的fs.readFile()一起fs.readFile()变得很烦人。 安装 npm install --save jsonfile 原料药 readFile(文件名,[选项],回调) options ( object ,默认undefined ):通行证在任何选项或组reviver用于。 throws ( boolean ,默认值: true )。 如果JSON.parse引发错误,则将此错误传递给回调。 如果为false ,则为该对象返回null 。 const jsonfile = require ( 'jsonfile' ) cons
【文件预览】:
node-jsonfile-master
----.travis.yml(183B)
----utils.js(498B)
----index.js(2KB)
----package.json(762B)
----test()
--------write-file-sync.test.js(4KB)
--------read-file.test.js(6KB)
--------read-file-sync.test.js(4KB)
--------write-file.test.js(7KB)
----LICENSE(1KB)
----appveyor.yml(548B)
----.gitignore(34B)
----CHANGELOG.md(9KB)
----README.md(6KB)
----.editorconfig(114B)

网友评论