Socket
Socket
Sign inDemoInstall

metro-cache-key

Package Overview
Dependencies
Maintainers
3
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro-cache-key - npm Package Compare versions

Comparing version 0.63.0 to 0.64.0

src.real/index.js.flow

4

package.json
{
"name": "metro-cache-key",
"version": "0.63.0",
"version": "0.64.0",
"description": "🚇 Cache key utility.",

@@ -16,4 +16,4 @@ "main": "src/index.js",

"devDependencies": {
"ob1": "0.63.0"
"ob1": "0.64.0"
}
}

@@ -7,20 +7,20 @@ /**

*
* @flow
*
* @format
*/
"use strict";
'use strict';
const crypto = require("crypto");
const crypto = require('crypto');
const fs = require('fs');
const fs = require("fs");
function getCacheKey(files: Array<string>): string {
function getCacheKey(files) {
return files
.reduce(
(hash, file) => hash.update('\0', 'utf8').update(fs.readFileSync(file)),
crypto.createHash('md5'),
(hash, file) => hash.update("\0", "utf8").update(fs.readFileSync(file)),
crypto.createHash("md5")
)
.digest('hex');
.digest("hex");
}
module.exports = getCacheKey;
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