summaryrefslogtreecommitdiff
path: root/std/node/_fs/_fs_readlink.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/node/_fs/_fs_readlink.ts
parent9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff)
Use dprint for internal formatting (#6682)
Diffstat (limited to 'std/node/_fs/_fs_readlink.ts')
-rw-r--r--std/node/_fs/_fs_readlink.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/std/node/_fs/_fs_readlink.ts b/std/node/_fs/_fs_readlink.ts
index 11ce43f55..866ea187b 100644
--- a/std/node/_fs/_fs_readlink.ts
+++ b/std/node/_fs/_fs_readlink.ts
@@ -8,7 +8,7 @@ import { fromFileUrl } from "../path.ts";
type ReadlinkCallback = (
err: MaybeEmpty<Error>,
- linkString: MaybeEmpty<string | Uint8Array>
+ linkString: MaybeEmpty<string | Uint8Array>,
) => void;
interface ReadlinkOptions {
@@ -17,7 +17,7 @@ interface ReadlinkOptions {
function maybeEncode(
data: string,
- encoding: string | null
+ encoding: string | null,
): string | Uint8Array {
if (encoding === "buffer") {
return new TextEncoder().encode(data);
@@ -26,7 +26,7 @@ function maybeEncode(
}
function getEncoding(
- optOrCallback?: ReadlinkOptions | ReadlinkCallback
+ optOrCallback?: ReadlinkOptions | ReadlinkCallback,
): string | null {
if (!optOrCallback || typeof optOrCallback === "function") {
return null;
@@ -50,7 +50,7 @@ function getEncoding(
export function readlink(
path: string | URL,
optOrCallback: ReadlinkCallback | ReadlinkOptions,
- callback?: ReadlinkCallback
+ callback?: ReadlinkCallback,
): void {
path = path instanceof URL ? fromFileUrl(path) : path;
@@ -67,13 +67,13 @@ export function readlink(
Deno.readLink,
(data: string): string | Uint8Array => maybeEncode(data, encoding),
cb,
- path
+ path,
);
}
export function readlinkSync(
path: string | URL,
- opt?: ReadlinkOptions
+ opt?: ReadlinkOptions,
): string | Uint8Array {
path = path instanceof URL ? fromFileUrl(path) : path;