url-transformers
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"scripts": { | ||
@@ -12,0 +12,0 @@ "compile": "rm -rf ./target/ && tsc", |
@@ -1,7 +0,8 @@ | ||
/// <reference types="node" /> | ||
import { ParsedUrlQuery } from 'querystring'; | ||
declare type ParsedUrlQueryInput = { | ||
[key: string]: unknown; | ||
}; | ||
export declare const addQueryToUrl: (b: { | ||
url: string; | ||
}) => (a: { | ||
queryToAppend: ParsedUrlQuery; | ||
queryToAppend: ParsedUrlQueryInput; | ||
}) => string; | ||
@@ -28,1 +29,2 @@ export declare const replacePathInUrl: (b: { | ||
}) => string; | ||
export {}; |
@@ -5,3 +5,3 @@ "use strict"; | ||
var index_1 = require("./index"); | ||
assert.strictEqual(index_1.addQueryToUrl({ url: 'http://foo.com/' })({ queryToAppend: { a: 'b' } }), 'http://foo.com/?a=b'); | ||
assert.strictEqual(index_1.addQueryToUrl({ url: 'http://foo.com/' })({ queryToAppend: { a: 'b', number: 1 } }), 'http://foo.com/?a=b&number=1'); | ||
assert.strictEqual(index_1.addQueryToUrl({ url: 'http://foo:bar@baz.com/' })({ | ||
@@ -8,0 +8,0 @@ queryToAppend: { a: 'b' }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17350
194