code: function expectKey(options, key, type) {
    if (key in options) {
      if (typeof options[key] === type) {
        return true
      }
      // eslint-disable-next-line no-console
      console.warn(`Ignoring options key '${key}' - ` +
        `expected type '${type}', received '${typeof options[key]}'`)
    }
    return false
  }
docs: check whether options contain given key and that it is the same type as in cfg