Socket
Socket
Sign inDemoInstall

yow

Package Overview
Dependencies
1
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.112 to 1.0.113

33

config.js

@@ -0,12 +1,24 @@

const fs = require('fs');
const Path = require('path');
module.exports = function loadConfig(fileName) {
var config = {};
let configFile = '';
let config = {};
function loadConfig(fileName) {
if (fileName == undefined)
fileName = '.config';
var json = {};
try {
var fs = require('fs');
json = JSON.parse(fs.readFileSync(fileName));
if (!fs.existsSync(configFile)) {
configFile = Path.join(Path.dirname(process.argv[1]), fileName);
}
if (!fs.existsSync(configFile)) {
configFile = Path.resolve(process.cwd(), fileName);
}
if (fs.existsSync(configFile)) {
config = JSON.parse(fs.readFileSync(configFile));
}
}

@@ -17,10 +29,3 @@ catch(error) {

json.load = loadConfig;
return json;
return config;
}
var config = loadConfig('.config');
module.exports = config;
const fs = require('fs');
const Path = require('path');
function loadConfig(fileName) {
module.exports = function loadConfig(fileName) {
let configFile = '';
let config = {};
if (fileName == undefined)
fileName = '.config';
try {

@@ -27,3 +31,1 @@ if (!fs.existsSync(configFile)) {

}
module.exports = loadConfig('.config');
{
"name": "yow",
"version": "1.0.112",
"version": "1.0.113",
"description": "You Only Wish module",

@@ -5,0 +5,0 @@ "main": "yow.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc