From d9693db3e468f90edfe45d6fc5c3d1a2b8d68981 Mon Sep 17 00:00:00 2001 From: Blake Doss Date: Sat, 3 Oct 2015 10:29:27 -0400 Subject: [PATCH] Added duplicateQueryParameters method from docs. --- urijs/URIjs-tests.ts | 7 ++++++- urijs/URIjs.d.ts | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/urijs/URIjs-tests.ts b/urijs/URIjs-tests.ts index 3501a6efc..0f529fe4a 100644 --- a/urijs/URIjs-tests.ts +++ b/urijs/URIjs-tests.ts @@ -37,4 +37,9 @@ var uri: uri.URI = $('a').uri(); URI('http://example.org/foo/hello.html').segment('bar'); URI('http://example.org/foo/hello.html').segment(0, 'bar'); -URI('http://example.org/foo/hello.html').segment(['foo', 'bar', 'foobar.html']); \ No newline at end of file +URI('http://example.org/foo/hello.html').segment(['foo', 'bar', 'foobar.html']); + +var withDuplicates = URI("?bar=1&bar=1") + .duplicateQueryParameters(true) + .normalizeQuery() + .toString(); \ No newline at end of file diff --git a/urijs/URIjs.d.ts b/urijs/URIjs.d.ts index a41e06cbf..3bd4ba366 100644 --- a/urijs/URIjs.d.ts +++ b/urijs/URIjs.d.ts @@ -27,6 +27,8 @@ declare module uri { domain(): string; domain(domain: boolean): string; domain(domain: string): URI; + + duplicateQueryParameters(val: boolean): URI; equals(): boolean; equals(url: string): boolean;