MCPcopy
hub / github.com/Koenkk/zigbee2mqtt / parseValueRef

Function parseValueRef

lib/util/settings.ts:143–155  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

141}
142
143function parseValueRef(text: string): {filename: string; key: string} | null {
144 const match = /!(.*) (.*)/g.exec(text);
145 if (match) {
146 let filename = match[1];
147 // This is mainly for backward compatibility.
148 if (!filename.endsWith(".yaml") && !filename.endsWith(".yml")) {
149 filename += ".yaml";
150 }
151 return {filename, key: match[2]};
152 }
153
154 return null;
155}
156
157export function writeMinimalDefaults(): void {
158 const minimal = {

Callers 2

writeFunction · 0.85
interpretValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected