HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/f/r/e/frenchy/www/french-american.org/current/node_modules/snyk-config/lib/nconf-truth.js
/**
 * monkey patch nconf to support TRUE & FALSE on env & arg to port to bool
 */

var nconf = require('nconf');
var common = require('nconf/lib/nconf/common');

nconf.Env.prototype.loadEnv = function () {
  var self = this;

  this.readOnly = false;
  Object.keys(process.env).filter(function (key) {
    if (self.match && self.whitelist.length) {
      return key.match(self.match) || self.whitelist.indexOf(key) !== -1;
    } else if (self.match) {
      return key.match(self.match);
    } else {
      return !self.whitelist.length || self.whitelist.indexOf(key) !== -1;
    }
  }).forEach(function (key) {
    var value = process.env[key];
    if (value === 'TRUE' || value === 'true') {
      value = true;
    } else if (value === 'FALSE' || value === 'false') {
      value = false;
    }

    if (self.separator) {
      self.set(common.key.apply(common, key.split(self.separator)), value);
    } else {
      self.set(key, value);
    }
  });

  this.readOnly = true;
  return this.store;
};