All files / packages/utils/src constant.ts

0% Statements 0/3
0% Branches 0/1
0% Functions 0/1
0% Lines 0/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12                       
export const WindowsSlashRE = /\\/g
 
/**
 * windows 盘符
 * @description 匹配 `x:/` 或 `x:\\` 开头的文本
 * @description 最好先将 windows下的路径转换为 posix 风格,否则由于字符串斜杠转义问题,可能会导致正则匹配失败
 */
export const WindowsDiskRE = /^[a-z]?:(?:\/|\\\\)/i
 
// eslint-disable-next-line no-control-regex
export const ColorStringRE = /\x1B[[(?);]{0,2}(;?\d)*./g