mirror of
https://github.com/prompt-security/clawsec.git
synced 2026-06-16 06:51:21 +03:00
0d2e38ddfd
* Add Picoclaw guardian + posture-review skills at v0.0.1 with wiki docs * fix(feed): add picoclaw to core platform taxonomy and filters * fix(picoclaw): resolve eslint errors in new skills * chore(nvd): include picoclaw in CVE polling and cleanup report --------- Co-authored-by: David Abutbul <David.a@prompt.security>
12 lines
364 B
JavaScript
12 lines
364 B
JavaScript
export function stableStringify(value, space = 2) {
|
|
return JSON.stringify(sortDeep(value), null, space);
|
|
}
|
|
|
|
function sortDeep(value) {
|
|
if (Array.isArray(value)) return value.map(sortDeep);
|
|
if (!value || typeof value !== "object") return value;
|
|
const out = {};
|
|
for (const key of Object.keys(value).sort()) out[key] = sortDeep(value[key]);
|
|
return out;
|
|
}
|