micro-jsonp
A tiny library that scrapes document.head
for <meta>
tags with content
attributes. Useful for gathering social data.
Usage
const data = /** data = { 'description': 'Default description tag.', 'og:description': 'Open graph description tag.', 'twitter:description': 'Twitter description tag.'} */
API
scrape({ name, value })
name
Either a string or a regex to compare with the attribute name.
value
Either a string or a regex to compare with the attribute found after comparison with the name
parameter.
MIT License