Add setQuery and setSearch methods

This commit is contained in:
Brian Surowiec
2015-05-25 15:08:09 -04:00
parent 74eeac855c
commit e15a4e3df3
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -26,4 +26,9 @@ new URI({
fragment: 'frag'
});
URI('').setQuery('foo', 'bar');
URI('').setQuery({ foo: 'bar' });
URI('').setSearch('foo', 'bar');
URI('').setSearch({ foo: 'bar' });
var uri: uri.URI = $('a').uri();
+4
View File
@@ -97,6 +97,10 @@ declare module uri {
segment(position: number): string;
segment(position: number, level: string): string;
segment(level: string): string;
setQuery(key: string, value: string): URI;
setQuery(qry: Object): URI;
setSearch(key: string, value: string): URI;
setSearch(qry: Object): URI;
subdomain(): string;
subdomain(subdomain: string): URI;
suffix(): string;