MCPcopy
hub / github.com/di-sukharev/opencommit / populate

Function populate

out/cli.cjs:2127–2151  ·  view source on GitHub ↗
(processEnv, parsed, options = {})

Source from the content-addressed store, hash-verified

2125 }
2126 }
2127 function populate(processEnv, parsed, options = {}) {
2128 const debug5 = Boolean(options && options.debug);
2129 const override = Boolean(options && options.override);
2130 if (typeof parsed !== "object") {
2131 const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
2132 err.code = "OBJECT_REQUIRED";
2133 throw err;
2134 }
2135 for (const key of Object.keys(parsed)) {
2136 if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
2137 if (override === true) {
2138 processEnv[key] = parsed[key];
2139 }
2140 if (debug5) {
2141 if (override === true) {
2142 _debug(`"${key}" is already defined and WAS overwritten`);
2143 } else {
2144 _debug(`"${key}" is already defined and was NOT overwritten`);
2145 }
2146 }
2147 } else {
2148 processEnv[key] = parsed[key];
2149 }
2150 }
2151 }
2152 var DotenvModule = {
2153 configDotenv,
2154 _configVault,

Calls 2

_debugFunction · 0.85
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…