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
1
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.0 to 1.0.2

24

index.js

@@ -62,2 +62,24 @@ const helper = require('think-helper');

module.exports = Config;
function getConfigFn(configs, isMultiModule){
let configInstances = {};
if(isMultiModule){
for(let name in configs){
configInstances[name] = new Config(configs[name]);
}
}else{
configInstances.common = new Config(configs);
}
return (name, value, m) => {
let conf = configInstances.common;
if(isMultiModule){
conf = configInstances[m];
}
if(value === undefined){
return conf.get(name);
}
conf.set(name, value);
}
}
exports.Config = Config;
exports.getConfigFn = getConfigFn;

2

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

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

import test from 'ava';
import Config from '../index.js';
import {Config} from '../index.js';

@@ -4,0 +4,0 @@

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