meta-links-extract
Reads in HTML, returns an array of objects representing the <link>
elements
Installation
yarn add meta-links-extract
Or if you're using npm:
npm install --save meta-links-extract
Usage
const extract = const html = ` <html> <head> <link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000"> </head> <body> </body> </html>` // => [{ color: '#000000', href: 'https://assets-cdn.github.com/pinned-octocat.svg', rel: 'mask-icon' }]
Tests
npm test
LICENSE
MIT