Skip to content

Commit

Permalink
sort objects for more stable diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
nleanba committed Oct 22, 2024
1 parent 0c7adca commit 1ab4db1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gg2rdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,7 @@ export function gg2rdf(
function outputSubject(s: Subject) {
if (s.propNames.length) {
if (s.propNames[s.propNames.length - 1].startsWith("#")) {
// only comments
output(
`\n# No properties for ${s.uri}\n ${
s.propNames.map((n) => `${n} ${[...s.properties[n]].join(", ")}`)
Expand All @@ -1462,7 +1463,9 @@ export function gg2rdf(
} else {
output(
`\n${s.uri}\n ${
s.propNames.map((n) => `${n} ${[...s.properties[n]].join(", ")}`)
s.propNames.map((n) =>
`${n} ${[...s.properties[n]].sort().join(", ")}`
)
.join(
" ;\n ",
)
Expand Down

0 comments on commit 1ab4db1

Please sign in to comment.