https://github.com/junosuarez/node-link-rel-parser
parse HTTP link headers and HTML links
https://github.com/junosuarez/node-link-rel-parser
Last synced: about 1 month ago
JSON representation
parse HTTP link headers and HTML links
- Host: GitHub
- URL: https://github.com/junosuarez/node-link-rel-parser
- Owner: junosuarez
- License: isc
- Created: 2014-06-30T10:23:00.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-01T02:29:22.000Z (about 12 years ago)
- Last Synced: 2025-10-31T19:24:46.458Z (9 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# link-rel-parser
parse HTTP link headers and HTML links
## usage
```js
var linkRelParser = require('link-rel-parser')
e.g.
linkRelParser('http://log.jden.us', function (e, links) {
console.log(e, links)
})
```
links is an object like:
```js
{
shortcut: ['http://assets.tumblr.com/images/default_avatar/cube_closed_128.png' ],
icon: [ 'http://assets.tumblr.com/images/default_avatar/cube_closed_128.png' ],
alternate: [ 'android-app://com.tumblr/tumblr/x-callback-url/blog?blogName=logjdenus' ],
stylesheet: [ 'http://assets.tumblr.com/fonts/gibson/stylesheet.css?v=3']
}
```
## installation
$ npm install link-rel-parser
## running the tests
From package root:
$ npm install
$ npm test
## contributors
- jden
## license
ISC. (c) MMXIV jden . See LICENSE.md