MCPcopy
hub / github.com/NginxProxyManager/nginx-proxy-manager / configHas

Function configHas

backend/lib/config.js:153–167  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

151 * @returns {boolean}
152 */
153const configHas = (key) => {
154 instance === null && configure();
155 const keys = key.split(".");
156 let level = instance;
157 let has = true;
158 keys.forEach((keyItem) => {
159 if (typeof level[keyItem] === "undefined") {
160 has = false;
161 } else {
162 level = level[keyItem];
163 }
164 });
165
166 return has;
167};
168
169/**
170 * Gets a specific key from the top level

Callers 1

generateDbConfigFunction · 0.90

Calls 1

configureFunction · 0.85

Tested by

no test coverage detected