MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / isWithinOrEqual

Function isWithinOrEqual

packages/node/src/dev/hotStateReload.ts:199–202  ·  view source on GitHub ↗
(root: string, candidate: string)

Source from the content-addressed store, hash-verified

197}
198
199function isWithinOrEqual(root: string, candidate: string): boolean {
200 const rel = relative(root, candidate);
201 return rel === "" || (!rel.startsWith("..") && !isAbsolute(rel));
202}
203
204function safeReadDir(dir: string): readonly Dirent[] {
205 try {

Callers 2

createHotStateReloadFunction · 0.85
shouldReloadForPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected