MOON
Server: Apache
System: Linux 54-179-220-51.cprapid.com 3.10.0-1160.144.1.el7.tuxcare.els4.x86_64 #1 SMP Tue Apr 7 08:40:40 UTC 2026 x86_64
User: thehunarfound (1001)
PHP: 7.4.29
Disabled: NONE
Upload Files
File: /home/thehunarfound/public_html/DMSold/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;
};
;;