MCPcopy Create free account
hub / github.com/denoland/std / assertArgs

Function assertArgs

path/_common/basename.ts:45–53  ·  view source on GitHub ↗
(path: string, suffix: string)

Source from the content-addressed store, hash-verified

43}
44
45export function assertArgs(path: string, suffix: string) {
46 assertPath(path);
47 if (path.length === 0) return path;
48 if (typeof suffix !== "string") {
49 throw new TypeError(
50 `Suffix must be a string, received "${JSON.stringify(suffix)}"`,
51 );
52 }
53}

Callers 5

basename_test.tsFile · 0.90
basenameFunction · 0.90
relativeFunction · 0.90
basenameFunction · 0.90
relativeFunction · 0.90

Calls 2

assertPathFunction · 0.90
stringifyMethod · 0.80

Tested by

no test coverage detected