object-uri

2.1.1 • Public • Published

Uri

Immutable Uri.

Grammar

[method!][type:]//host[/path...][?{params...}][#hash]

API

class Uri
  create(...sources) // used at top level
  fork(...sources) // nested
  toString()

Example

var uri = Uri.create("http://example.com/do?force=true#anchor")
    .fork({hash:'anchor2', params:{a:1}}, {params:{a2:2}})
    .withParams({a3:3, force:false});

alert(uri.host); // 'example.com'

alert(uri.toString()); // "http://example.com/do?force=false&a=1&a2=2&a3=3#anchor2"

Repo

[https://github.com/alitskevich/object-uri]

Legal

The MIT License (MIT)

Copyright (c) 2015 Alex Litskevich

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i object-uri

    Weekly Downloads

    0

    Version

    2.1.1

    License

    MIT

    Last publish

    Collaborators

    • alitskevich