normalize-package-data
normalize-package-data copied to clipboard
[QUESTION] How "verbose" should the normalized version be?
For example, the code currently sets the "_id" field. A concatenation of name and version.
It also adds all optional dependencies to dependencies. I have no experience with the "semantics" of optional dependencies, but it's certainly verbose.
People fields (author and such) are expanded to {name,email,url} objects. Handy when coding, but maybe less appropriate as a canonical version.
Normalization code like this might have two actually use cases: One for easy consumption by computers, one for fixing a human's mistake, but keeping the JSON somewhat humane.
It may be an argument for a "humanize-package-data" module or so.