node-red-contrib-conta-azul-api
Version:
Conta Azul API wrapper for Node-Red
15 lines (13 loc) • 667 B
JavaScript
// for node (client) and config (server)
const createBackwardCompatible = (obj) => {
if (typeof obj.requestContentType === 'undefined') obj.requestContentType = obj.contentType
if (typeof obj.responseContentType === 'undefined') obj.responseContentType = ''
if (typeof obj.alternServer === 'undefined') obj.alternServer = false
if (typeof obj.keepAuth === 'undefined') obj.keepAuth = false
if (typeof obj.showBanner === 'undefined') obj.showBanner = false
if (typeof obj.showDescription === 'undefined') obj.showDescription = true
if (typeof obj.internalErrors === 'undefined') obj.internalErrors = {}
}
module.exports = {
createBackwardCompatible
}