0.1.0 • Published 11 years ago
unfurl v0.1.0
Unfurl.js

Extract the query string and hash of a URL.
Usage
unfurl('https://github.com/?foo&bar=42&baz=Hello#World');
/* =>
* {
* query: {
* foo: true,
* bar: 42,
* baz: 'Hello'
* },
* hash: 'World'
* }
*/Values extracted (for both the query and hash) will be cast to a primitive type where possible. (See Stereotype.js.)
More usage examples are in the tests.
API
unfurl(url)
Returns an object containing the query and hash components of the given url string.
Installation
Install via npm:
$ npm i --save unfurlLicense
0.1.0
11 years ago