MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / normalize

Function normalize

scripts/check-generated-artifact-diff.cjs:46–51  ·  view source on GitHub ↗
(file, content)

Source from the content-addressed store, hash-verified

44}
45
46function normalize(file, content) {
47 if (file.endsWith('.json')) {
48 return JSON.stringify(stripGeneratedMetadata(JSON.parse(content)), null, 2) + '\n';
49 }
50 return content;
51}
52
53function readHead(file) {
54 const result = spawnSync('git', ['show', `HEAD:${file}`], { encoding: 'utf8' });

Calls 1

stripGeneratedMetadataFunction · 0.85

Tested by

no test coverage detected