Comparing version 1.3.0 to 2.0.0
'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)) { | ||
@@ -6,0 +6,0 @@ input = input.join(''); |
'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); | ||
@@ -10,0 +10,0 @@ }; |
{ | ||
"name": "md5-hex", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"description": "Create a MD5 hash with hex encoding", | ||
@@ -12,5 +12,4 @@ "license": "MIT", | ||
}, | ||
"browser": "browser.js", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=4" | ||
}, | ||
@@ -39,3 +38,4 @@ "scripts": { | ||
"xo": "*" | ||
} | ||
}, | ||
"browser": "browser.js" | ||
} |
@@ -7,2 +7,4 @@ # md5-hex [![Build Status](https://travis-ci.org/sindresorhus/md5-hex.svg?branch=master)](https://travis-ci.org/sindresorhus/md5-hex) | ||
Works in the browser too, when used with browserify/webpack. | ||
Checkout [`hasha`](https://github.com/sindresorhus/hasha) if you need something more flexible. | ||
@@ -36,3 +38,3 @@ | ||
Type: `buffer` `string` `array[string|buffer]` | ||
Type: `Buffer` `string` `Buffer[]` `string[]` | ||
@@ -39,0 +41,0 @@ Prefer buffers as they're faster to hash, but strings can be useful for small things. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3438
47