Skip to content

BaggersIO/anchorize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

anchorize

This is a super fast, tiny and solid client-side URL parser.

anchorize.js parses your URL natively without any regular expressions or string operations. Since it uses your browsers built in renderer you will get a quite safe result :)

Installation

bower install anchorize
<script type="text/javascript" src="bower_components/anchorize.js"></script>

Example

var parsed = anchorize('http://bob:secret@any.host:1337/sub/path?foo=bar#jumpto');

parsed.protocol; // http
parsed.username; // bob
parsed.password; // secret
parsed.host;     // any.host:1337
parsed.port;     // 1337
parsed.search;   // ?foo=bar
parsed.hash;     // #jumpto

About

This is a super fast and solid client-side URL parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published