remove unnecessary path.resolve in move/readJson/writeJson (denoland/deno_std#292)

Original: a00c51b05b
This commit is contained in:
Axetroy 2019-03-20 01:23:22 +08:00 committed by Ryan Dahl
parent eaa795d477
commit adb19cbae3
4 changed files with 16 additions and 19 deletions

View file

@ -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 {