Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return result
})
} else {
delete packageData.editions
}
// trim empty keys
for (const key in packageData) {
if (packageData.hasOwnProperty(key)) {
const value = packageData[key]
if (typeChecker.isArray(value) && typeChecker.isEmptyArray(value)) {
console.log(`trim: array: package.json:${key}`)
delete packageData[key]
} else if (
typeChecker.isPlainObject(value) &&
typeChecker.isEmptyPlainObject(value)
) {
console.log(`trim: empty: package.json:${key}`)
delete packageData[key]
} else if (value == null || value === '') {
console.log(`trim: null|'': package.json:${key}`)
delete packageData[key]
}
}
}
// ---------------------------------
// Badges
// set travisTLD if it is com
// we don't set it explicity to org
// so that when the official migration happens, there will be no manual changes