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

think-config

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

think-config - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

27

index.js

@@ -73,10 +73,29 @@ const helper = require('think-helper');

let conf = configInstances.common;
if (isMultiModule && m && configInstances[m]) {
conf = configInstances[m];
// single module
if (!isMultiModule) {
if (value === undefined) {
return conf.get(name);
}
return conf.set(name, value);
}
if (!conf) return;
// get config
if (value === undefined) {
if (m && configInstances[m]) {
conf = configInstances[m];
}
return conf.get(name);
}
conf.set(name, value);
// set all modules config
if (m === true) {
for (const mName in configInstances) {
configInstances[mName].set(name, value);
}
return;
}
// set multi modules config
m.split(',').forEach(item => {
const conf = configInstances[item];
if (!conf) return;
conf.set(name, value);
});
};

@@ -83,0 +102,0 @@ }

2

package.json
{
"name": "think-config",
"description": "config for ThinkJS",
"version": "1.0.5",
"version": "1.1.0",
"author": {

@@ -6,0 +6,0 @@ "name": "welefen",

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