All files / path / _common / assert_path.ts

100.00% Branches 1/1
100.00% Lines 6/6
1
2
3
4
5
6
7
8
9
10
 
 
 
x112
x7951
x7953
x7953
 
x7953
x7951








// Copyright 2018-2025 the Deno authors. 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)}"`,
    );
  }
}