MCPcopy Create free account
hub / github.com/brillout/react-streaming / assertPosixPath

Function assertPosixPath

src/utils/path.ts:14–21  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

12}
13
14function assertPosixPath(path: string): void {
15 const errMsg = (msg: string) => `Not a posix path: ${msg}`
16 assert(path !== null, errMsg('null'))
17 assert(typeof path === 'string', errMsg(`typeof path === ${JSON.stringify(typeof path)}`))
18 assert(path !== '', errMsg('(empty string)'))
19 assert(path)
20 assert(!path.includes('\\'), errMsg(path))
21}

Callers 1

toPosixPathFunction · 0.85

Calls 2

assertFunction · 0.85
errMsgFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…