From 5c8ec8e024e24b23b8a472878f10f931a9205d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Sun, 23 Dec 2018 17:21:58 +0800 Subject: [PATCH] fixed fs bug --- index.js | 8 ++++---- package.json | 15 ++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index c292ad2..0c568a2 100644 --- a/index.js +++ b/index.js @@ -133,11 +133,11 @@ module.exports = { * @param {Str} file [文件路径] */ md5Sign(file) { - if (!fs.existsSync(file)) { + if (!FS.existsSync(file)) { return null } - let fileStream = fs.readFileSync(file) + let fileStream = FS.readFileSync(file) return this.hash('md5', fileStream) }, @@ -162,11 +162,11 @@ module.exports = { * @param {Str} file [文件路径] */ sha1Sign(file) { - if (!fs.existsSync(file)) { + if (!FS.existsSync(file)) { return null } - let fileStream = fs.readFileSync(file) + let fileStream = FS.readFileSync(file) return this.hash('sha1', fileStream) }, diff --git a/package.json b/package.json index d09fd31..7ebe047 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,13 @@ { "name": "crypto.js", - "version": "1.1.5", + "version": "1.1.6", "description": "原生crypto加密模块的二次封装,简化常用加密函数的使用", - "keywords": [ - "md5", - "sha1", - "base64", - "fivejs", - "crypto" - ], + "keywords": ["md5", "sha1", "base64", "fivejs", "crypto"], "author": "yutent ", - "repository": { "type": "git", "url": "https://github.com/yutent/crypto.js.git" }, + "repository": { + "type": "git", + "url": "https://github.com/yutent/crypto.js.git" + }, "dependencies": {}, "devDependencies": {}, "main": "index.js"