to-quoted-string:将源代码转换为带引号的字符串以用作模板模块

时间:2021-06-23 03:52:51
【文件属性】:
文件名称:to-quoted-string:将源代码转换为带引号的字符串以用作模板模块
文件大小:7KB
文件格式:ZIP
更新时间:2021-06-23 03:52:51
JavaScript 引用字符串 将源代码转换为模板以用作模块。 使用安装 npm i to-quoted-string --save 跳转到 用法 var toQuotedString = require ( 'to-quoted-string' ) ; 假设你想把这个模板变成一个 javascript 模块: <!DOCTYPE html > < html lang =" en " > < head > < meta charset =" UTF-8 " > < title > {{title}} </ title > </ head > < body > {% body %} </ body > </ html > 传递字符串 var fs = require ( 'fs' ) ; var str = fs . readFileSync ( 'foo
【文件预览】:
to-quoted-string-master
----.jshintrc(302B)
----.gitignore(130B)
----package.json(1KB)
----cli.js(988B)
----LICENSE(1KB)
----index.js(765B)
----test.js(872B)
----.verb.md(2KB)
----README.md(2KB)
----.gitattributes(127B)
----fixtures()
--------index.html(150B)
--------wrap.js(517B)
----.editorconfig(295B)

网友评论