Get an anchor by href and optional
query.
$ npm install get-anchor
const getAnchor = require('get-anchor')
// create an anchor on the DOM
const anchorEl = document.createElement('a')
anchorEl.setAttribute('href', '#oh-my-element')
document.body.appendChild(anchorEl)
getAnchor('oh-my-element')
// => <a href="#oh-my-element"></a>
Get an anchor by href and optional
query.
Returns the first match.