mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
11 lines
309 B
TypeScript
11 lines
309 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
// Copyright the Browserify authors. MIT License.
|
|
|
|
export function assertPath(path?: string) {
|
|
if (typeof path !== "string") {
|
|
throw new TypeError(
|
|
`Path must be a string, received "${JSON.stringify(path)}"`,
|
|
);
|
|
}
|
|
}
|