mirror of
https://github.com/denoland/deno.git
synced 2025-10-03 07:34:36 +00:00
remove unnecessary path.resolve in move/readJson/writeJson (denoland/deno_std#292)
Original: a00c51b05b
This commit is contained in:
parent
eaa795d477
commit
adb19cbae3
4 changed files with 16 additions and 19 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue