【文件属性】:
文件名称:quick-format-unescaped:解决util.format问题
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-06 04:34:52
JavaScript
快速格式转义
不曾逃脱?
有时您想将快速格式化的结果嵌入到另一个字符串中,然后对整个字符串进行转义。
用法
var format = require ( 'quick-format-unescaped' )
format ( 'hello %s %j %d' , [ 'world' , [ { obj : true } , 4 , { another : 'obj' } ] ] )
格式(fmt,参数,[选项])
fmt
printf的格式字符串。 示例: 'hello %s %j %d'
参数
要插入到format字符串中的值的数组。 例如: ['world', {obj:true}]
options.stringify
将选项对象作为带有stringify的第三个参数传递将意味着将把任何对象传递给提供的函数,而不是内部tryStringify函数。 当使用增强的功能序列化器(例如
【文件预览】:
quick-format-unescaped-master
----.gitignore(52B)
----package.json(729B)
----LICENSE(1KB)
----index.js(3KB)
----.github()
--------workflows()
----benchmark.js(626B)
----readme.md(2KB)
----test()
--------index.js(4KB)