protocol-parser
v0.0.7
Published
Parse metatags for OGP, Twitter cards, and OSMT
Downloads
7
Maintainers
Readme
#protocol-parser Parse metatags for various protocols: OGP, Twitter, citation, DC and OSMT supported.
Installation
$ npm install protocol-parser
Usage
var protocolParser = require('protocol-parser')
protocolParser.isProfileCompliant(window, 'os', 'https://github.com/RichardLitt/open-source-metatags/')
=> true
protocolParser.parse(window, ['os', 'twitter'])
=> {
'os': {
repo: "https://github.com/RichardLitt/open-source-metatags",
rcs_type: "git",
src: "[email protected]:RichardLitt/open-source-metatags.git",
issue: "https://github.com/RichardLitt/open-source-metatags/issues"
},
'twitter': {...}
}
protocolParser.standardProtocols()
=> {
'citation': {...},
'dc': {...},
'og': {...},
'os': {...},
'twitter': {...}
}
Credits
Written and maintained by Richard Littauer.