input object.
Optional
options: OptionsToutput options.
const obj = {
ccu: {
django: {
allowedHosts: '*',
csrfCookieSecure: false,
},
},
sentry: {
traceExcludeUrls: ['one', 'two', 'three'],
},
}
const result = convertToScreamingSnakeCase(obj, { nestedDelimiter: '__' })
console.log(result)
// {
// CCU__DJANGO__ALLOWED_HOSTS: '*',
// CCU__DJANGO__CSRF_COOKIE_SECURE: false,
// SENTRY__TRACE_EXCLUDE_URLS: 'one,two,three',
// }
Generated using TypeDoc
Flatten a nested object into a single level object using 'SCREAMING_SNAKE_CASE'.