fast-json-escape:快速JSON字符串转义

时间:2021-05-15 00:08:27
【文件属性】:
文件名称:fast-json-escape:快速JSON字符串转义
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-15 00:08:27
JavaScript JSON转义 在JS中快速转义JSON字符串。 手动转义小的JSON字符串比使用本机更快。 主要焦点是非常快速地检查不需要转义的字符串,同时还改善了转义自身或至少不低于JSON.stringify的条件。 基准测试 运行基准测试( npm run benchmark )显示出以下好处: 节点./基准 JSON short non escaped x 2 , 884 , 878 ops/sec ± 2.25 % ( 95 runs sampled) this short non escaped x 13 , 082 , 026 ops/sec ± 1.47 % ( 93 runs sampled) JSON short full escape 1 x 2 , 768 , 607 ops/sec ± 1.85 % ( 86 runs sampled) this short full es
【文件预览】:
fast-json-escape-master
----index.js(2KB)
----test.js(354B)
----package.json(734B)
----LICENSE(1KB)
----.gitignore(932B)
----benchmark.js(2KB)
----.npmrc(19B)
----README.md(2KB)

网友评论