then-parse-json:使用承诺优雅地解析 JSON - 承诺的 JSON.parse

时间:2021-06-02 20:22:13
【文件属性】:
文件名称:then-parse-json:使用承诺优雅地解析 JSON - 承诺的 JSON.parse
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-02 20:22:13
JavaScript 然后解析json 使用承诺优雅地解析 JSON - 承诺的 JSON.parse 安装 npm i then-parse-json --save npm test 用法 有关更多用例,请参阅 var JSONParse = require ( 'then-parse-json' ) JSONParse ( '{"foo":"bar"}' ) . then ( function ( res ) { console . log ( res ) //=> {foo: 'bar'} } ) . catch ( console . error ) 有关的 :功能齐全的 Promises/A+ 实现,性能非常好 : 制作同步函数以支持回调api : 简单的 Promises/A+ 实现 :使用 JSON.parse 读取 JSON 的快速、有意义且正确的 try/catch 流
【文件预览】:
then-parse-json-master
----.travis.yml(429B)
----index.js(395B)
----test.js(1KB)
----package.json(648B)
----CONTRIBUTING.md(1KB)
----LICENSE.md(1KB)
----.gitignore(619B)
----CHANGELOG.md(261B)
----README.md(4KB)
----.editorconfig(397B)

网友评论