Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-crypto-hash

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-crypto-hash - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

18

package.json
{
"name": "js-crypto-hash",
"version": "0.1.0",
"version": "0.1.1",
"description": "Universal Module for Hash Function in JavaScript",

@@ -27,4 +27,4 @@ "main": "dist/index.js",

"devDependencies": {
"@babel/cli": "7.1.0",
"@babel/core": "7.1.0",
"@babel/cli": "7.1.2",
"@babel/core": "7.1.2",
"@babel/plugin-transform-runtime": "7.1.0",

@@ -34,8 +34,8 @@ "@babel/polyfill": "7.0.0",

"@babel/register": "7.0.0",
"babel-eslint": "10.0.0",
"babel-loader": "8.0.2",
"babel-eslint": "10.0.1",
"babel-loader": "8.0.4",
"babel-plugin-istanbul": "5.1.0",
"babel-preset-minify": "^0.5.0",
"chai": "^4.1.2",
"eslint": "5.6.0",
"chai": "^4.2.0",
"eslint": "5.6.1",
"karma": "3.0.0",

@@ -51,8 +51,8 @@ "karma-chrome-launcher": "^2.2.0",

"webpack": "^4.20.2",
"webpack-cli": "^3.1.1"
"webpack-cli": "^3.1.2"
},
"dependencies": {
"@babel/plugin-transform-regenerator": "7.0.0",
"@babel/runtime": "7.0.0"
"@babel/runtime": "7.1.2"
}
}

@@ -39,3 +39,13 @@ Universal Module for Hash Function in JavaScript

## How to bundle scripts importing this module via Webpack
When you bundle files importing this module via Webpack for web, the bundler tries to simultaneously bundle modules that are compatible to some native modules of Node.js, i.e., those in`node-libs-browser` module. But this module automatically chooses the native `crypto` module in Node.js and `crypto.subtle` of Web API in browsers by checking its running environment, and hence the bundled modules of `node-libs-browser` are redundant. From this observation, you should exclude them wen you create bundle scripts importing this module. In particular, the `externals` option of `webpack.config.js` is useful as follows.
```javascript
{
externals: {
'crypto': true
}
}
```
# License
Licensed under the MIT license, see `LICENSE` file.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc