MCPcopy Create free account
hub / github.com/Rello/analytics / resolve

Function resolve

js/filter.js:263–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261 return [];
262 }
263 const resolve = reference => {
264 if (!reference) return null;
265 if (reference.startsWith('source-ref:')) {
266 const ref = reference.slice('source-ref:'.length);
267 return sourceColumns.some(column => column.ref === ref) ? ref : null;
268 }
269 const match = reference.match(/^source:(\d+):(.+)$/);
270 if (!match) return null;
271 const name = decodeURIComponent(match[2]);
272 const byIndex = sourceColumns[Number(match[1])];
273 if (byIndex?.name === name) return byIndex.ref;
274 const matches = sourceColumns.filter(column => column.name === name);
275 return matches.length === 1 ? matches[0].ref : null;
276 };
277 const converted = calculations.map((calc, index) => {
278 const references = calc.references.length
279 ? calc.references

Callers 4

filter.jsFile · 0.85
reference.jsFile · 0.85
svg2canvasMethod · 0.85
runScenarioFunction · 0.85

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected