meta-links-extract

1.0.3 • Public • Published

meta-links-extract

Reads in HTML, returns an array of objects representing the <link> elements

Travis Codecov npm npm

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

Package Sidebar

Install

npm i meta-links-extract

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • ahacop