code: function slugger (header, mode) {
    mode = mode || 'marked'
    let replace
  
    switch (mode) {
      case MODE.MARKED:
        replace = getMarkedId
        break
      case MODE.MARKDOWNIT:
        return getMarkDownItAnchorId(header)
      case MODE.GITHUB:
        replace = getGithubId
        break
      case MODE.GITLAB:
        replace = getGitlabId
        break
      case MODE.PANDOC:
        replace = getPandocId
        break
      case MODE.BITBUCKET:
        replace = getBitbucketId
        break
      case MODE.GHOST:
        replace = getGhostId
        break
      default:
        throw new Error('Unknown mode: ' + mode)
    }
  
    const href = replace(asciiOnlyToLowerCase(header.trim()))
  
    return encodeURI(href)
  }
docs: Generates an anchor for the given header and mode.
  
  @param header      {String} The header to be anchored.
  @param mode        {String} The anchor mode (github.com|nodejs.org|bitbucket.org|ghost.org|gitlab.com).
  @return            {String} The header anchor that is compatible with the given mode.