MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / changeText

Function changeText

libatomic/src/review/viewer.js:85–92  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

83 return value.status === 'not_applicable' && ['File is absent in this revision', 'Subject is not present in this revision'].includes(value.reason);
84 }
85 function changeText(node) {
86 if (viewSnapshot) return 'Snapshot value; no comparison';
87 const observation = node.properties.observation;
88 if (typeof node.properties.delta === 'number') return (node.properties.delta > 0 ? '+' : '') + node.properties.delta;
89 if (isAbsent(observation.before) && observation.after.status === 'measured') return 'New subject';
90 if (isAbsent(observation.after) && observation.before.status === 'measured') return 'Removed subject';
91 return 'Not comparable';
92 }
93 function changed(node) {
94 if (!node) return false;
95 const value = node.properties.observation;

Callers 2

showCardFunction · 0.85
metricTableFunction · 0.85

Calls 1

isAbsentFunction · 0.85

Tested by

no test coverage detected