code: function script(source, options) {
    var tokens
  
    /* Make sure the require to the main module
     * is showed as if it was a require from
     * `./node_modules`.
     *
     * For example, when the example file
     * (`test/example.js`) requires the main file (as
     * listed in `test/package.json`, `main: "module.js"`)
     * as `./module`, it is replaced with `test`. */
    source = source.replace(EXPRESSION_REQUIRE, replace)
  
    /* Transform comments into markdown: */
    tokens = []
  
    source.split('\n').forEach(each)
  
    return tokens
  
    function replace($0, $1, $2, $3) {
      var filepath = resolveFrom.silent(
        path.dirname(options.example),
        unquote($2)
      )
      var quote
  
      if (options.main === filepath && options.name) {
        /* Honour quote style. */
        quote = $2.charAt(0)
  
        return $1 + quote + options.name + quote + $3
      }
  
      return $0
    }
  
    function each(line) {
      var match = line.match(EXPRESSION_COMMENT)
  
      tokens.push({
        type: match ? 'markdown' : 'javascript',
        value: match ? match[4] : line
      })
    }
  }
docs: /* Transform a script into an intermediate nodes,
  removes the IDs from `console.log` invocations,
  and resolves the main `require` call.