@tstdl/base 0.88.0-alpha5 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/schema/constraints/maximum-length.d.ts +1 -1
- package/schema/constraints/minimum-length.d.ts +1 -1
- package/schema/types/types.js +5 -6
- package/text/localization.service.js +4 -4
- package/types.d.ts +1 -1
- package/utils/merge.js +3 -3
- package/utils/object/decycle.js +2 -2
- package/utils/repl.js +1 -1
- package/utils/type-guards.d.ts +263 -243
- package/utils/type-guards.js +319 -243
- package/utils/url-builder.js +5 -3
package/utils/url-builder.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalizeHttpValue } from '../http/types.js';
|
|
1
|
+
import { normalizeHttpValue, normalizeSingleHttpValue } from '../http/types.js';
|
|
2
2
|
import { memoizeSingle } from './function/memoize.js';
|
|
3
3
|
import { isArray, isDefined, isObject, isUndefined } from './type-guards.js';
|
|
4
4
|
var UrlBuilderPartType;
|
|
@@ -40,10 +40,12 @@ export function compileUrlBuilder(url) {
|
|
|
40
40
|
if (isUndefined(value)) {
|
|
41
41
|
throw new Error(`Url parameter ${part.value} not provided. (${url})`);
|
|
42
42
|
}
|
|
43
|
-
if (isObject(value)) {
|
|
43
|
+
if (isObject(value) && !isArray(value)) {
|
|
44
44
|
throw new Error(`Url parameter ${part.value} is an object. (${url})`);
|
|
45
45
|
}
|
|
46
|
-
parsedUrl += isArray(value)
|
|
46
|
+
parsedUrl += isArray(value)
|
|
47
|
+
? value.map(normalizeHttpValue).join(arraySeparator)
|
|
48
|
+
: normalizeSingleHttpValue(value);
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
return { parsedUrl, parametersRest };
|