bin/app.js
/**
 * Given an object returns another object
 * by filtering out any keys in the object
 * that start with CFNSANE_ and removing
 * the prefix and lowercasing the rest.
 * @param {object} env
 */
Given an object returns another object
by filtering out any keys in the object
that start with CFNSANE_ and removing
the prefix and lowercasing the rest.
@param {object} env
Given an object returns another object by filtering out any keys in the object that start with CFNSANE_ and removing the prefix and lowercasing the rest . @param { object } env
function loadConfig(env) {
    let loaded = {}
    for (const [key, value] of Object.entries(env)) {
        if (!key.startsWith('CFNSANE_')){
            continue;
        };
        normalizedKey = key.replace('CFNSANE_', '');
        loaded[normalizedKey.toLowerCase()] = value;
    }
    return loaded;
}
function loadConfig ( env ) { let loaded = { } for ( const [ key , value ] of Object . entries ( env ) ) { if ( ! key . startsWith ( 'CFNSANE_' ) ) { continue ; } ; normalizedKey = key . replace ( 'CFNSANE_' , '' ) ; loaded [ normalizedKey . toLowerCase ( ) ] = value ; } return loaded ; }
Given an object returns another object
 by filtering out any keys in the object
 that start with CFNSANE_ and removing
 the prefix and lowercasing the rest.
Given an object returns another object by filtering out any keys in the object that start with CFNSANE_ and removing the prefix and lowercasing the rest .