normalize-registry-metadata
clean some common fields in package metadata objects you get from registry changes feeds
var clean = var request = request
API
normalize(doc [,optional options {}])
-
options.tarballUrl
- if you need to rewrite the tarball url to point to another server the values in this object are set to the corresponding key in the parsed tarball url then passed to url.format
-
if the document is invalid this will return
undefined
-
runs semver.clean on all versions.
doc.version[version]
doc.version[version].version
doc.version[version]._id
doc.time[version]
doc['dist-tags'][tag] = version
-
removes dist-tags that point to uncleanable semver
-
removes dist-tags that do not point to a version
-
removes legacy ctime and mtime fields.