New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jwz

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwz - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

37

index.js
const axios = require('axios');
const fs = require('fs');

@@ -6,27 +7,25 @@ ////////////////

//////////////
import { readFileSync } from 'fs';
function readPropertiesFile(filePath) {
const fileContent = readFileSync(filePath, 'utf-8');
const lines = fileContent.split('\n');
const config = {};
const fileContent = fs.readFileSync(filePath, 'utf-8');
const lines = fileContent.split('\n');
const config = {};
lines.forEach(line => {
const trimmedLine = line.trim();
if (trimmedLine && trimmedLine.includes('=')) {
const [key, ...valueParts] = trimmedLine.split('=');
const value = valueParts.join('=').trim();
config[key.trim()] = value;
}
});
lines.forEach(line => {
const trimmedLine = line.trim();
if (trimmedLine && trimmedLine.includes('=')) {
const [key, ...valueParts] = trimmedLine.split('=');
const value = valueParts.join('=').trim();
config[key.trim()] = value;
}
});
return config;
return config;
}
function replacePlaceholders(url, replacements) {
for (const placeholder in replacements) {
const placeholderValue = replacements[placeholder];
url = url.replace(new RegExp(`\\$\\{${placeholder}\\}`, 'g'), placeholderValue);
}
return url;
for (const placeholder in replacements) {
const placeholderValue = replacements[placeholder];
url = url.replace(new RegExp(`\\$\\{${placeholder}\\}`, 'g'), placeholderValue);
}
return url;
}

@@ -33,0 +32,0 @@

{
"name": "jwz",
"version": "1.2.0",
"version": "1.2.1",
"description": "Utils",

@@ -5,0 +5,0 @@ "repository": {

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