@aws-sdk/querystring-builder
Advanced tools
Comparing version 3.183.0 to 3.186.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06) | ||
**Note:** Version bump only for package @aws-sdk/querystring-builder | ||
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03) | ||
@@ -8,0 +16,0 @@ |
@@ -0,21 +1,33 @@ | ||
import { __values } from "tslib"; | ||
import { escapeUri } from "@aws-sdk/util-uri-escape"; | ||
export function buildQueryString(query) { | ||
const parts = []; | ||
for (let key of Object.keys(query).sort()) { | ||
const value = query[key]; | ||
key = escapeUri(key); | ||
if (Array.isArray(value)) { | ||
for (let i = 0, iLen = value.length; i < iLen; i++) { | ||
parts.push(`${key}=${escapeUri(value[i])}`); | ||
var e_1, _a; | ||
var parts = []; | ||
try { | ||
for (var _b = __values(Object.keys(query).sort()), _c = _b.next(); !_c.done; _c = _b.next()) { | ||
var key = _c.value; | ||
var value = query[key]; | ||
key = escapeUri(key); | ||
if (Array.isArray(value)) { | ||
for (var i = 0, iLen = value.length; i < iLen; i++) { | ||
parts.push("".concat(key, "=").concat(escapeUri(value[i]))); | ||
} | ||
} | ||
} | ||
else { | ||
let qsEntry = key; | ||
if (value || typeof value === "string") { | ||
qsEntry += `=${escapeUri(value)}`; | ||
else { | ||
var qsEntry = key; | ||
if (value || typeof value === "string") { | ||
qsEntry += "=".concat(escapeUri(value)); | ||
} | ||
parts.push(qsEntry); | ||
} | ||
parts.push(qsEntry); | ||
} | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
finally { | ||
try { | ||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
} | ||
return parts.join("&"); | ||
} |
{ | ||
"name": "@aws-sdk/querystring-builder", | ||
"version": "3.183.0", | ||
"version": "3.186.0", | ||
"scripts": { | ||
@@ -23,4 +23,4 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@aws-sdk/types": "3.183.0", | ||
"@aws-sdk/util-uri-escape": "3.183.0", | ||
"@aws-sdk/types": "3.186.0", | ||
"@aws-sdk/util-uri-escape": "3.186.0", | ||
"tslib": "^2.3.1" | ||
@@ -27,0 +27,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46632
62
+ Added@aws-sdk/types@3.186.0(transitive)
+ Added@aws-sdk/util-uri-escape@3.186.0(transitive)
- Removed@aws-sdk/types@3.183.0(transitive)
- Removed@aws-sdk/util-uri-escape@3.183.0(transitive)
Updated@aws-sdk/types@3.186.0