@author Rowan Crawford (wombleton@gmail.com) @version 0.2 @requires jQuery, $.uritemplate @link http://github.com/wombleton/link-headers JavaScript parsing of linkheaders as per http://tools.ietf.org/html/draft-nottingham-http-link-header-10 Usage: var linkHeader = '; rel="foo foz bar"; type="application/json", ; rel="foz baz"; type="application/json"'; var links = $.linkheaders(linkHeader); links.find('foo bar').href().expand({ itemId: 'xxx' }) => /collection/xxx links.find(['foz']).href().expand({ itemId: 'xxx' }) => /collection/xxx links.find('baz').rel() => 'foz baz' links.find('foz').attr('type') => 'application/json links.findAll('foz') => Array with two links links.each(fn) => calls fn(i, link) on each link. links.each('foo', fn) => calls fn(i, link) on each link that has rel 'foo'. MIT License