meta-links-extract
v1.0.3
Published
Extract links tags from HTML metadata
Downloads
4
Maintainers
Readme
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 = require("meta-links-extract")
const html = `
<html>
<head>
<link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">
</head>
<body>
</body>
</html>`
extract(html)
// => [{ color: '#000000', href: 'https://assets-cdn.github.com/pinned-octocat.svg', rel: 'mask-icon' }]
Tests
npm test
LICENSE
MIT