uri-template
Parse and expand URI templates as defined by http://tools.ietf.org/html/rfc6570

uri-template downloads uri-template version uri-template license

uri-template유사 패키지:
npm 다운로드 트렌드
3 년
🌟 uri-template의 README.md에 실시간 사용 차트를 표시하려면 아래 코드를 복사하세요.
## Usage Trend
[![Usage Trend of uri-template](https://npm-compare.com/img/npm-trend/THREE_YEARS/uri-template.png)](https://npm-compare.com/uri-template#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 uri-template의 README.md에 GitHub Stars 트렌드 차트를 표시하려면 아래 코드를 복사하세요.
## GitHub Stars Trend
[![GitHub Stars Trend of uri-template](https://npm-compare.com/img/github-trend/uri-template.png)](https://npm-compare.com/uri-template)
통계 세부사항
패키지
다운로드
Stars
크기
Issues
발행일
라이선스
uri-template156,43242-14年前MIT
uri-template의 README

URI Template

Node.js CI

This is a node.js implementation of the URI template draft standard defined at http://tools.ietf.org/html/rfc6570

Example

var parser = require("uri-template");

var tpl = parser.parse("/{year}/{month}/{day}{?orderBy,direction}");

tpl.expand({ year: 2006, month: 6, day: 6 });
// /2006/6/6

tpl.expand({ year: 2006, month: 6, day: 6, orderBy: "size" });
// /2006/6/6?orderBy=size

tpl.expand({ year: 2006, month: 6, day: 6, orderBy: "time", direction: "asc" });
// /2006/6/6?orderBy=time&direction=asc

var queryTpl = parser.parse("/search{?q,otherParams*}");
queryTpl.expand({
  q: "Bigger office",
  otherParams: { prefer: "Sterling's office", accept: "Crane's office" },
});
// /search?q=Bigger%20office&prefer=Sterling%27s%20office&accept=Crane%27s%20office

For more thorough coverage of the syntax, see the RFC.