From 870678dd1d75298a6585d28f37d0e914a66196fa Mon Sep 17 00:00:00 2001 From: Jobin George Date: Fri, 15 Nov 2019 14:34:22 +0530 Subject: [PATCH] Update readJSON.js --- readJSON.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readJSON.js b/readJSON.js index 13dbb1a..acd6309 100644 --- a/readJSON.js +++ b/readJSON.js @@ -7,8 +7,8 @@ const fs = require("fs") function 读JSON文件(fileName=''){ - var strList = fileName.split("."); - var string; + let strList = fileName.split("."); + let string; if(strList[strList.length-1].toLowerCase()=="json"){ string = fs.readFileSync(fileName); } @@ -17,4 +17,4 @@ function 读JSON文件(fileName=''){ } module.exports={ 读JSON文件:读JSON文件 -} \ No newline at end of file +}