GHHG10's picture
download
raw
467 Bytes
export * as Wildcard from "./wildcard"
export function match(input: string, pattern: string) {
const normalized = input.replaceAll("\\", "/")
let escaped = pattern
.replaceAll("\\", "/")
.replace(/[.+^${}()|[\]\\]/g, "\\$&")
.replace(/\*/g, ".*")
.replace(/\?/g, ".")
if (escaped.endsWith(" .*")) escaped = escaped.slice(0, -3) + "( .*)?"
return new RegExp("^" + escaped + "$", process.platform === "win32" ? "si" : "s").test(normalized)
}

Xet Storage Details

Size:
467 Bytes
·
Xet hash:
330ef33cf64025040c9f57b25ae74797fde30ff70f765d79717def005af928a3

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.