code: function getTokenFromDocument (csrf) {
    if (!document) return
    const selector = isString(csrf) ? csrf : DEFAULT_CSRF_SELECTOR
    const meta = document.querySelector(`meta[name="${ selector }"]`)
    if (meta && (meta instanceof window.HTMLMetaElement)) return meta.content
  }
docs: Note: 'csrf' may be either: - A boolean indicating whether the token is needed (will use default selector to find it) - The name of the meta tag containing the token