lib/variable.js
function generateAccessor (accessor) {
    return function () {
      let value = container[varName]

      if (typeof value === 'undefined') {
        if (typeof defValue === 'undefined') {
          // Need to return since no value is available. If a value needed to
          // be available required() should be called, or a default passed
          return
        }

        // Assign the default as the value since process.env does not contain
        // the desired variable
        value = defValue
      }

      if (isBase64) {
        if (!value.match(base64Regex)) {
          generateRaiseError(value)('should be a valid base64 string if using convertFromBase64')
        }

        value = Buffer.from(value, 'base64').toString()
      }

      const args = [
        generateRaiseError(value),
        value
      ].concat(Array.prototype.slice.call(arguments))

      return accessor.apply(
        accessor,
        args
      )
    }
  }
function generateAccessor (accessor) {
    return function () {
      let value = container[varName]

      if (typeof value === 'undefined') {
        if (typeof defValue === 'undefined') {
          // Need to return since no value is available. If a value needed to
          // be available required() should be called, or a default passed
          return
        }

        // Assign the default as the value since process.env does not contain
        // the desired variable
        value = defValue
      }

      if (isBase64) {
        if (!value.match(base64Regex)) {
          generateRaiseError(value)('should be a valid base64 string if using convertFromBase64')
        }

        value = Buffer.from(value, 'base64').toString()
      }

      const args = [
        generateRaiseError(value),
        value
      ].concat(Array.prototype.slice.call(arguments))

      return accessor.apply(
        accessor,
        args
      )
    }
  }
Returns an accessor wrapped by error handling and args passing logic
@param {String} accessorPath