多行:JavaScript中的多行字符串

时间:2021-02-22 09:00:55
【文件属性】:
文件名称:多行:JavaScript中的多行字符串
文件大小:8KB
文件格式:ZIP
更新时间:2021-02-22 09:00:55
deprecated JavaScript 多行 JavaScript中的多行字符串 没有更多的字符串连接或数组联接! 尽可能使用ES2015 。 前 const str = '' + '<!doctype html>' + '<html>' + ' <body>' + '

:red_heart: unicorns

' + ' </body>' + '</html>' + '' ; 后 const str = multiline ( ( ) => { /* <!doctype html> <html> <body>

:red_heart: unicorns

</body> </html> */ } ) ; 如何 它通过将文本包装在块注释,匿名函数和函数调用中来工作。 匿名函数被传递到函数调用中,并提取注释的内容。 即使它,这也不现实,因为您仍然可以每秒完成200万次。 始终提供微性能带来的便利。 安装 $ npm inst
【文件预览】:
multiline-main
----experiment.js(688B)
----.gitignore(23B)
----experiment_test.js(421B)
----package.json(767B)
----.npmrc(19B)
----.travis.yml(51B)
----index.js(683B)
----test.js(2KB)
----license(1KB)
----readme.md(4KB)
----.gitattributes(29B)
----bower.json(481B)
----browser.js(2KB)
----.editorconfig(175B)

网友评论