summaryrefslogtreecommitdiff
path: root/fs/write_json.ts
diff options
context:
space:
mode:
authorAxetroy <troy450409405@gmail.com>2019-03-20 01:23:22 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-03-19 13:23:22 -0400
commitadb19cbae366288a152dd3ab8293e5aea2edc80b (patch)
tree22c7d07bf3f15df58b247c089fbc4670f68f6304 /fs/write_json.ts
parenteaa795d477948c11a99d0c1cf42f25ba668d892f (diff)
remove unnecessary path.resolve in move/readJson/writeJson (denoland/deno_std#292)
Original: https://github.com/denoland/deno_std/commit/a00c51b05b6172d250b04a3bb6c244e5276c2704
Diffstat (limited to 'fs/write_json.ts')
-rw-r--r--fs/write_json.ts5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/write_json.ts b/fs/write_json.ts
index f94489095..c5936d3f8 100644
--- a/fs/write_json.ts
+++ b/fs/write_json.ts
@@ -1,6 +1,5 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
/* eslint-disable @typescript-eslint/no-explicit-any */
-import * as path from "./path/mod.ts";
type Replacer = (key: string, value: any) => any;
export interface WriteJsonOptions {
@@ -14,8 +13,6 @@ export async function writeJson(
object: any,
options: WriteJsonOptions = {}
): Promise<void> {
- filePath = path.resolve(filePath);
-
let contentRaw = "";
try {
@@ -38,8 +35,6 @@ export function writeJsonSync(
object: any,
options: WriteJsonOptions = {}
): void {
- filePath = path.resolve(filePath);
-
let contentRaw = "";
try {