function prepareObjectsToLog(env, opts) {
  /* Short circuit - do nothing if env is false-y or if it's an array. */
  if (!env || Array.isArray(env)) return [];

  opts = prepareConfOpts(config.logEnvVars, opts);
  return Object.keys(env || {})
  .sort()
  .map((name) => {
    const val = opts.maskList.includes(name) ? 'hidden' :
      truncate(env[name], opts.maxValueLength);
    return {
      name,
      value: `"${val}"`,
    };
  });
} // prepareObjectsToLog
/**
 * Returns array of 'env' activity log objects, or returns an empty array if
 * env is not an object or is false-y or is an array.
 *
 * @param {Object} env - will be process.env, but exposing it as arg to make it
 *  easier to test (assumes it has typeof "object")
 * @param {Object} opts - will be config.logEnvVars, but exposing it as arg to
 *  make it easier to test
 */
Returns array of 'env' activity log objects, or returns an empty array if
env is not an object or is false-y or is an array.

@param {Object} env - will be process.env, but exposing it as arg to make it
easier to test (assumes it has typeof "object")
@param {Object} opts - will be config.logEnvVars, but exposing it as arg to
make it easier to test
Returns array of ' env ' activity log objects or returns an empty array if env is not an object or is false - y or is an array . @param { Object } env - will be process . env but exposing it as arg to make it easier to test ( assumes it has typeof " object " ) @param { Object } opts - will be config . logEnvVars but exposing it as arg to make it easier to test
function prepareObjectsToLog(env, opts) {
  if (!env || Array.isArray(env)) return [];
  opts = prepareConfOpts(config.logEnvVars, opts);
  return Object.keys(env || {})
  .sort()
  .map((name) => {
    const val = opts.maskList.includes(name) ? 'hidden' :
      truncate(env[name], opts.maxValueLength);
    return {
      name,
      value: `"${val}"`,
    };
  });
} 
function prepareObjectsToLog ( env , opts ) { if ( ! env || Array . isArray ( env ) ) return [ ] ; opts = prepareConfOpts ( config . logEnvVars , opts ) ; return Object . keys ( env || { } ) . sort ( ) . map ( ( name ) => { const val = opts . maskList . includes ( name ) ? 'hidden' : truncate ( env [ name ] , opts . maxValueLength ) ; return { name , value : ` ${ val } ` , } ; } ) ; }
Returns array of 'env' activity log objects, or returns an empty array if
 env is not an object or is false-y or is an array.
Returns array of ' env ' activity log objects or returns an empty array if env is not an object or is false - y or is an array .
/* Short circuit - do nothing if env is false-y or if it's an array. */ // prepareObjectsToLog