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

electricity

Package Overview
Dependencies
Maintainers
3
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electricity - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

18

lib/index.js

@@ -327,13 +327,15 @@ const crypto = require('crypto');

function urlBuilder(urlPath) {
let file;
const request = parseUrlPath(urlPath);
let url = urlPath;
try {
file = fetchFile(request.path);
} catch(err) {
// If we don't have a file that matches the specified URL path simply return the original URL path
return urlPath;
}
if (options.hashify) {
try {
const request = parseUrlPath(urlPath);
const file = fetchFile(request.path);
url = hashifyUrl(request.path, file.hash);
} catch(err) {
// If we don't have a file that matches the specified URL path simply return the original URL path
}
url = hashifyUrl(request.path, file.hash);
}

@@ -340,0 +342,0 @@

@@ -37,3 +37,3 @@ {

},
"version": "3.0.2"
"version": "3.0.3"
}
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