Một mục tập trung giao diện trong kho dữ liệu GitHub của TopGit: medialize/URI.js, 6.2k sao, nhóm Frontend, JavaScript. Javascript URL mutation library
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Things are looking up with URL and the URL spec but until we can safely rely on that API, have a look at URI.js for a clean and simple API for mutating URIs:
var url = new URI("http://example.org/foo?bar=baz");
url.addQuery("foo", "bar");
URI.js (without plugins) has a gzipped weight of about 7KB - if you include all extensions you end up at about 13KB. So unless you need second level domain support and use URI templates, we suggest you don't include them in your build. If you don't need a full featured URI mangler, it may be worth looking into the much smaller parser-only alternatives listed below.
URI.js is available through npm, bower, bowercdn, cdnjs and manually from the build page:
# using bower
bower install uri.js
# using npm
npm install urijs
Browser
I guess you'll manage to use the build tool or follow the instructions below to combine and minify the various files into URI.min.js - and I'm fairly certain you know how to <script src=".../URI.min.js"></script> that sucker, too.
Node.js and NPM
Install with npm install urijs or add "urijs" to the dependencies in your package.json.
// load URI.js
var URI = require('urijs');
// load an optional module (e.g. URITemplate)
var URITemplate = require('urijs/src/URITemplate');
URI("/foo/bar/baz.html")
.relativeTo("/foo/bar/sub/world.html")
// -> ../baz.html
RequireJS
Clone the URI.js repository or use a package manager to get URI.js into your project.
RFC 2732 - Format for Literal IPv6 Addresses in URL's
RFC 2368 - The mailto: URL Scheme
RFC 2141 - URN Syntax
IANA URN Namespace Registry
Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)
application/x-www-form-urlencoded (Query String Parameters) and application/x-www-form-urlencoded encoding algorithm
What every web developer must know about URL encoding
Informal stuff
Parsing URLs for Fun and Profit
Naming URL components
How other environments do things
Java URI Class
Java Inet6Address Class
Node.js URL API
Discussion on Hacker News
Forks / Code-borrow
node-dom-urls passy's partial implementation of the W3C URL Spec Draft for Node
urlutils cofounders' window.URL constructor for Node
Alternatives
If you don't like URI.js, you may like one of the following libraries. (If yours is not listed, drop me a line…)
Polyfill
DOM-URL-Polyfill arv's polyfill of the DOM URL spec for browsers
inexorabletash inexorabletash's WHATWG URL API
URL Manipulation
The simple URL Mutation "Hack" (jsPerf comparison)
URL.js
furl (Python)
mediawiki Uri (needs mw and jQuery)
jurlp
jsUri
URL Toolkit Build an absolute URL from a base URL and a relative URL (RFC 1808)
URL Parsers
The simple URL Mutation "Hack" (jsPerf comparison)
URI Parser
jQuery-URL-Parser
Google Closure Uri
URI.js by Gary Court
URI Template
uri-template (supporting extraction as well) by Rezigne
uri-templates (supporting extraction as well) by Geraint Luff
uri-templates by Marc Portier
uri-templates by Geraint Luff (including reverse operation)
URI Template JS by Franz Antesberger
Temple by Brett Stimmerman
(jsperf comparison)
Various
TLD.js - second level domain names
Public Suffix - second level domain names
uri-collection - underscore based utility for working with many URIs
Authors
Rodney Rehm
Various Contributors
Contains Code From
punycode.js - Mathias Bynens
IPv6.js - Rich Brown - (rewrite of the original)
License
URI.js is published under the MIT license. Until version 1.13.2 URI.js was also published under the GPL v3 license - but as this dual-licensing causes more questions than helps anyone, it was dropped with version 1.14.0.
medialize/URI.js có 6.2k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/medialize/URI.js. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
medialize/URI.js có những chủ đề gì?
GitHub topics của medialize/URI.js: "javascript", "rfc-2732", "rfc-3986", "rfc-6570", "uri", "uri-template", "url", "url-parser". TopGit xếp repo vào nhóm Frontend.
medialize/URI.js còn đang phát triển không?
Commit gần nhất trên medialize/URI.js là 3.0 năm trước (theo timestamp GitHub). Repo có 468 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
medialize/URI.js là gì?
medialize/URI.js (medialize/URI.js) là dự án JavaScript trên GitHub. Theo mô tả gốc: Javascript URL mutation library
medialize/URI.js so với các dự án Frontend khác thế nào?
medialize/URI.js được TopGit xếp vào nhóm Frontend, với 6.2k sao GitHub và viết bằng JavaScript. Xem trang chủ đề Frontend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
medialize/URI.js viết bằng ngôn ngữ gì?
medialize/URI.js chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao medialize/URI.js được xếp vào nhóm Frontend?
TopGit xếp medialize/URI.js vào nhóm Frontend dựa trên GitHub topics và mô tả của repo (gắn thẻ: "javascript", "rfc-2732", "rfc-3986"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc URI.js có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về URI.js.