From adb19cbae366288a152dd3ab8293e5aea2edc80b Mon Sep 17 00:00:00 2001 From: Axetroy Date: Wed, 20 Mar 2019 01:23:22 +0800 Subject: remove unnecessary path.resolve in move/readJson/writeJson (denoland/deno_std#292) Original: https://github.com/denoland/deno_std/commit/a00c51b05b6172d250b04a3bb6c244e5276c2704 --- fs/write_json.ts | 5 ----- 1 file changed, 5 deletions(-) (limited to 'fs/write_json.ts') 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 { - 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 { -- cgit v1.2.3