【文件属性】:
文件名称:scoped-regex:用于匹配作用域npm软件包名称的正则表达式
文件大小:5KB
文件格式:ZIP
更新时间:2021-04-29 07:40:25
JavaScript
范围正则表达式
用于匹配正则表达式
安装
$ npm install scoped-regex
用法
import scopedRegex from 'scoped-regex' ;
scopedRegex ( { exact : true } ) . test ( '@sindresorhus/df' ) ;
//=> true
'foo @sindresorhus/df bar' . match ( scopedRegex ( ) ) ;
//=> ['@sindresorhus/df']
原料药
scopedRegex(选项?)
返回一个RegExp以匹配范围内的程序包名称。
选项
类型: object
精确的
类型: boolean 默认值: false (与字符串中的所有作用域包名称匹配)
只匹配一个确切的字符串。 与RegExp#test()用于检查字符串是否为作用域的程序
【文件预览】:
scoped-regex-main
----.gitignore(23B)
----package.json(731B)
----.npmrc(19B)
----index.js(198B)
----test.js(606B)
----.github()
--------workflows()
----license(1KB)
----readme.md(801B)
----index.test-d.ts(154B)
----.gitattributes(19B)
----.editorconfig(175B)
----index.d.ts(668B)