summaryrefslogtreecommitdiff
path: root/fs/read_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/read_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/read_json.ts')
-rw-r--r--fs/read_json.ts3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/read_json.ts b/fs/read_json.ts
index 1bed75078..8979c24e8 100644
--- a/fs/read_json.ts
+++ b/fs/read_json.ts
@@ -1,9 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
-import * as path from "./path/mod.ts";
/** Reads a JSON file and then parses it into an object */
export async function readJson(filePath: string): Promise<any> {
- filePath = path.resolve(filePath);
const decoder = new TextDecoder("utf-8");
const content = decoder.decode(await Deno.readFile(filePath));
@@ -18,7 +16,6 @@ export async function readJson(filePath: string): Promise<any> {
/** Reads a JSON file and then parses it into an object */
export function readJsonSync(filePath: string): any {
- filePath = path.resolve(filePath);
const decoder = new TextDecoder("utf-8");
const content = decoder.decode(Deno.readFileSync(filePath));