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 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 20x 20x 20x 20x 20x 20x 19x 236x 65x 20x 13x 20x 5x | export const newline = /[\r\n]+/
export const wildcard = /\*/
export const wildcards = /\*/g
export const special = /([\[\]\(\)*?^$.+])/g
export const termBounds = /^;|;$/g
export type CommonExpansions = {[index: string]: {root: string; part: string}}
const special_limited = /([\[\]\(\)?^$.+])/g
export function globToRegex(term: string) {
return ';' + term.replace(special_limited, '\\$&').replace(wildcards, '[^;]*') + ';'
}
export function sortByLength(a: string, b: string) {
return a.length - b.length
}
export function relativeFrequency(index: number, n?: number) {
return n && -1 !== index ? (1 - index / n) * 100 : 0
}
const regexDots = /\./g
export function prepareRegex(term: string) {
return ';' + term.replace(regexDots, '[^;]') + ';'
}
const filePath = /^.*[/\\]/
export function fileBaseName(file: string) {
return file.replace(filePath, '')
}
|