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"