   return unless hull_js_sdk
 
   # Map known config values to Hull init
-  _.reduce initParams, (config, param, key)->
+  out = _.reduce initParams, (config, param, key)->
     return unless config
     value = getParamValue(hull_js_sdk, param, key)
     if value?

    transform: transform.url
    validation: valid.regex(new RegExp("^" + document.location.origin + "/"))
  },
  debug:   { default: false, transform: transform.bool },
  verbose: { default: false, transform: transform.bool },
  embed: { default: true, transform: transform.bool },
  autoStart: { default: true, transform: transform.bool },
  accessToken: { default: null }
  customerId: { default: null }
}

getParamValue = (el, param, key)->
  keys = [key].concat(param.altKeys || [])
  transform = param.transform || (o)-> o
  value = _.reduce(keys, (ret, k)->
    if ret == null
      value = transform((el.getAttribute(dasherize(k)) || el.getAttribute(k)), key)
      valid = value? && (!param.validation  || param.validation(value, k))
      ret = value if valid
    ret
  , null)

dasherize = (str)->
  str.replace /[A-Z]/, (c) ->  "-" + c.toLowerCase()


httpsRegex = /^https:|^\/\//

valid =
  regex: (reg)-> (val, key)->
    check = reg.test(val)
    if !check
