summaryrefslogtreecommitdiff
path: root/std/path/_util.ts
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2020-07-14 15:24:17 -0400
committerGitHub <noreply@github.com>2020-07-14 15:24:17 -0400
commitcde4dbb35132848ffece59ef9cfaccff32347124 (patch)
treecc7830968c6decde704c8cfb83c9185193dc698f /std/path/_util.ts
parent9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff)
Use dprint for internal formatting (#6682)
Diffstat (limited to 'std/path/_util.ts')
-rw-r--r--std/path/_util.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/std/path/_util.ts b/std/path/_util.ts
index 0c3253045..ead425a0b 100644
--- a/std/path/_util.ts
+++ b/std/path/_util.ts
@@ -16,7 +16,7 @@ import {
export function assertPath(path: string): void {
if (typeof path !== "string") {
throw new TypeError(
- `Path must be a string. Received ${JSON.stringify(path)}`
+ `Path must be a string. Received ${JSON.stringify(path)}`,
);
}
}
@@ -41,7 +41,7 @@ export function normalizeString(
path: string,
allowAboveRoot: boolean,
separator: string,
- isPathSeparator: (code: number) => boolean
+ isPathSeparator: (code: number) => boolean,
): string {
let res = "";
let lastSegmentLength = 0;
@@ -106,11 +106,11 @@ export function normalizeString(
export function _format(
sep: string,
- pathObject: FormatInputPathObject
+ pathObject: FormatInputPathObject,
): string {
const dir: string | undefined = pathObject.dir || pathObject.root;
- const base: string =
- pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
+ const base: string = pathObject.base ||
+ (pathObject.name || "") + (pathObject.ext || "");
if (!dir) return base;
if (dir === pathObject.root) return dir + base;
return dir + sep + base;