summaryrefslogtreecommitdiff
path: root/tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts')
-rw-r--r--tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts b/tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts
new file mode 100644
index 000000000..7033edcd1
--- /dev/null
+++ b/tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts
@@ -0,0 +1,10 @@
+// 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)}`,
+ );
+ }
+}