Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Parse a Links header into a JavaScript object.

NotificationsYou must be signed in to change notification settings

jfromaniello/parse-links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parse aLinks header into a javascript object.

I'll no longer maintain this repository.li is a fork from this repository and allows parse and stringify.

Install

npm install parse-links

Usage

varparseLinks=require('parse-links');varsomeLinksHeader='</api/users?page=0&per_page=2>; rel="first", '+'</api/users?page=1&per_page=2>; rel="next", '+'</api/users?page=3&per_page=2>; rel="last"';console.log(parseLinks(someLinksHeader));// This will print:// {//   first: '/api/users?page=0&per_page=2',//   next: '/api/users?page=1&per_page=2',//   last: '/api/users?page=3&per_page=2'// }

License

MIT!

About

Parse a Links header into a JavaScript object.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp