Skip to content

Instantly share code, notes, and snippets.

@t-mart
Created October 9, 2019 16:21
Show Gist options
  • Save t-mart/494affd4748fcf6e64e627de0b9ccf39 to your computer and use it in GitHub Desktop.
Save t-mart/494affd4748fcf6e64e627de0b9ccf39 to your computer and use it in GitHub Desktop.
function getEntriesFromAElements(element) {
return element.querySelectorAll('a')
.map(e => ({ e.text : e.getAttribute('href') } ));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment