Visit the README.md on GitHub.
Paste this into the console in Google Chrome.
[].map
.call(document.querySelectorAll('.anchor'), el =>
`* [${el.nextSibling.nodeValue}](${el.getAttribute('href')})`
)
.join('\n');The output should look something like this;
"* [lodash v4.14.0](#lodash-v4140) * [Download](#download) * [Why Lodash?](#why-lodash) * [Module Formats](#module-formats)"
The above example was run at https://github.com/lodash/lodash.
EDIT
The following version is longer, but will indent the list according to the headers;
[].map
.call(document.querySelectorAll('.anchor'), function(el) {
var indents = ' '.repeat(parseFloat(el.parentNode.nodeName.charAt(1)) - 1);
var label = el.nextSibling.nodeValue;
var link = el.getAttribute('href');
return `${indents}* [${label}](${link})`
})
.join('\n');