2.1.1 • Published 8 years ago

object-uri v2.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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