diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/md5-hex | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/md5-hex')
-rw-r--r-- | node_modules/md5-hex/browser.js | 4 | ||||
-rw-r--r-- | node_modules/md5-hex/index.js | 8 | ||||
-rw-r--r-- | node_modules/md5-hex/package.json | 8 | ||||
-rw-r--r-- | node_modules/md5-hex/readme.md | 4 |
4 files changed, 13 insertions, 11 deletions
diff --git a/node_modules/md5-hex/browser.js b/node_modules/md5-hex/browser.js index 50b9b27cd..d6c2da0bf 100644 --- a/node_modules/md5-hex/browser.js +++ b/node_modules/md5-hex/browser.js @@ -1,7 +1,7 @@ 'use strict'; -var md5OMatic = require('md5-o-matic'); +const md5OMatic = require('md5-o-matic'); -module.exports = function (input) { +module.exports = input => { if (Array.isArray(input)) { input = input.join(''); } diff --git a/node_modules/md5-hex/index.js b/node_modules/md5-hex/index.js index c52bddd7c..82cfae306 100644 --- a/node_modules/md5-hex/index.js +++ b/node_modules/md5-hex/index.js @@ -1,11 +1,11 @@ 'use strict'; -var crypto = require('crypto'); +const crypto = require('crypto'); module.exports = function (input) { - var hash = crypto.createHash('md5'); + const hash = crypto.createHash('md5'); - var update = function (buf) { - var inputEncoding = typeof buf === 'string' ? 'utf8' : undefined; + const update = buf => { + const inputEncoding = typeof buf === 'string' ? 'utf8' : undefined; hash.update(buf, inputEncoding); }; diff --git a/node_modules/md5-hex/package.json b/node_modules/md5-hex/package.json index 9dc26627f..a87ce154f 100644 --- a/node_modules/md5-hex/package.json +++ b/node_modules/md5-hex/package.json @@ -1,6 +1,6 @@ { "name": "md5-hex", - "version": "1.3.0", + "version": "2.0.0", "description": "Create a MD5 hash with hex encoding", "license": "MIT", "repository": "sindresorhus/md5-hex", @@ -9,9 +9,8 @@ "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "browser": "browser.js", "engines": { - "node": ">=0.10.0" + "node": ">=4" }, "scripts": { "test": "xo && ava" @@ -35,5 +34,6 @@ "devDependencies": { "ava": "*", "xo": "*" - } + }, + "browser": "browser.js" } diff --git a/node_modules/md5-hex/readme.md b/node_modules/md5-hex/readme.md index df40a9415..630b31d0b 100644 --- a/node_modules/md5-hex/readme.md +++ b/node_modules/md5-hex/readme.md @@ -4,6 +4,8 @@ *Please don't use MD5 hashes for anything sensitive!* +Works in the browser too, when used with browserify/webpack. + Checkout [`hasha`](https://github.com/sindresorhus/hasha) if you need something more flexible. @@ -32,7 +34,7 @@ md5Hex(buffer); #### input -Type: `buffer` `string` `array[string|buffer]` +Type: `Buffer` `string` `Buffer[]` `string[]` Prefer buffers as they're faster to hash, but strings can be useful for small things. |