gbv / jskos-tools

Tools for working with the JSKOS data format.
https://gbv.github.io/jskos-tools/
MIT License
2 stars 0 forks source link

Improve `copyDeep` #43

Open stefandesu opened 3 months ago

stefandesu commented 3 months ago

Breaking change:

Currently, copyDeep replaces arrays that might contain circular properties with [null]. Instead, I would suggest keeping the items in the array, but only keeping the uri property of those items (e.g. ancestors, narrower, etc.). This would have more value than [null].

We might also add special handling for certain properties if it makes sense. This function is, after all, meant for JSKOS entities.