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

@narando/config

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@narando/config - npm Package Compare versions

Comparing version 0.14.3 to 0.22.0

35

dist/config.js

@@ -6,31 +6,30 @@ "use strict";

});
exports.default = void 0;
var _path = require("path");
var _path = _interopRequireDefault(require("path"));
var _path2 = _interopRequireDefault(_path);
var _nconf = _interopRequireDefault(require("nconf"));
var _nconf = require("nconf");
var _nconf2 = _interopRequireDefault(_nconf);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const loadConfig = () => {
const filepath = _path2.default.join(process.cwd(), "config.json");
const env = process.env.NODE_ENV || "dev";
const filepath = _path.default.join(process.cwd(), "config.json");
// Environment variables
_nconf2.default.env({ parseValues: true, separator: "__" });
const env = process.env.NODE_ENV || "dev"; // Environment variables
// Environment specific configuration file
_nconf.default.env({
parseValues: true,
separator: "__"
}); // Environment specific configuration file
var parts = filepath.split(".");
parts.splice(parts.length - 1, 0, env);
_nconf2.default.file(env, parts.join("."));
_nconf.default.file(env, parts.join(".")); // Default configuration file
// Default configuration file
_nconf2.default.file(filepath);
return _nconf2.default.get();
_nconf.default.file(filepath);
return _nconf.default.get();
};

@@ -43,2 +42,4 @@

exports.default = loadConfig();
var _default = loadConfig();
exports.default = _default;
{
"name": "@narando/config",
"version": "0.14.3",
"version": "0.22.0",
"description": "Read NODE_ENV dependent configuration files",

@@ -10,3 +10,3 @@ "main": "dist/config.js",

"scripts": {
"build": "babel ./src -d dist",
"build": "babel --root-mode upward ./src -d dist",
"prepare": "npm run build",

@@ -31,3 +31,9 @@ "test": "jest"

"access": "public"
}
},
"devDependencies": {
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/node": "^7.2.2"
},
"gitHead": "9c8b4f37690914ab272b6fe20cc7efa268186bb1"
}
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