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

pelias-config

Package Overview
Dependencies
Maintainers
5
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pelias-config - npm Package Compare versions

Comparing version 4.12.0 to 4.12.1

7

index.js

@@ -77,11 +77,10 @@ const fs = require('fs');

* cloning an object with _.merge or _.assign
*
* see: https://lodash.com/docs/4.17.15#get
*/
function addGetFunction(object) {
const getFunction = function get(key) {
return _.get(this, key);
};
// set 'get' convenience function on returned object
Object.defineProperty(object, 'get', {
value: getFunction,
value: _.get.bind(null, object),
enumerable: false // allows comparison to `expected.json` in tests

@@ -88,0 +87,0 @@ });

@@ -6,3 +6,3 @@ {

"homepage": "https://github.com/pelias/config",
"version": "4.12.0",
"version": "4.12.1",
"license": "MIT",

@@ -9,0 +9,0 @@ "main": "index.js",

var path = require('path'),
config = require('../'),
defaults = require('../config/defaults');
const path = require('path');
const config = require('../');
const defaults = require('../config/defaults');
const Joi = require('@hapi/joi');

@@ -274,2 +274,15 @@

test('get function supports defaultValue', (t) => {
// set the PELIAS_CONFIG env var
process.env.PELIAS_CONFIG = path.resolve(__dirname + '/../config/env.json');
const c = config.generate();
t.equals(c.get('foo', 'DEFAULT'), 'DEFAULT', 'default value used for keys that do not exist');
// unset the PELIAS_CONFIG env var
delete process.env.PELIAS_CONFIG;
t.end();
});
test('generateDefaults returns default config always', function(t) {

@@ -276,0 +289,0 @@ // set the PELIAS_CONFIG env var, this config should NOT be used

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