(glob)
| 451 | // The `**` sentinel is written as an escape, never a literal NUL byte — a raw |
| 452 | // one makes git treat this whole script as binary and costs every future diff. |
| 453 | const glob2re = (glob) => { |
| 454 | const S = '\\u0000'; |
| 455 | const body = glob.replace(/[.+^${}()|[\]\\]/g, '\\$&') |
| 456 | .replace(/\*\*/g, S).replace(/\*/g, '[^/]*').replaceAll(S, '.*'); |
| 457 | return new RegExp(`^${body}$`); |
| 458 | }; |
| 459 | const answerRes = answerGlobs.map(glob2re); |
| 460 | const isAnswer = (p) => answerRes.some((re) => re.test(p)); |
| 461 |
nothing calls this directly
no outgoing calls
no test coverage detected