shebang-regex:匹配shebang行的正则表达式

时间:2021-05-26 07:57:43
【文件属性】:
文件名称:shebang-regex:匹配shebang行的正则表达式
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-26 07:57:43
JavaScript 舍邦正则表达式 匹配行的正则表达式 安装 $ npm install shebang-regex 用法 const shebangRegex = require ( 'shebang-regex' ) ; const string = '#!/usr/bin/env node\nconsole.log("unicorns");' ; shebangRegex . test ( string ) ; //=> true shebangRegex . exec ( string ) [ 0 ] ; //=> '#!/usr/bin/env node' shebangRegex . exec ( string ) [ 1 ] ; //=> '/usr/bin/env node' Tidelift帮助维护人员实现开源的可持续发展,同时为公司提供帮助有关其依赖项的安全性,维护和许可的保证。
【文件预览】:
shebang-regex-main
----.gitignore(23B)
----package.json(582B)
----.npmrc(19B)
----index.js(42B)
----test.js(229B)
----.github()
--------security.md(179B)
--------workflows()
--------funding.yml(49B)
----license(1KB)
----readme.md(895B)
----index.test-d.ts(103B)
----.gitattributes(19B)
----.editorconfig(175B)
----index.d.ts(446B)

网友评论