We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17f77a0 commit 3822686Copy full SHA for 3822686
lib/stringify.js
@@ -21,9 +21,9 @@ function getAsPrimitive(value) {
21
}
22
23
/**
24
- * @callback
25
- * @param {any} input
26
- * @return {string}
+ * @param {Record<string, string | number | boolean
+ * | ReadonlyArray<string | number | boolean> | null>} input
+ * @returns {string}
27
*/
28
function stringify(input) {
29
let result = "";
@@ -32,9 +32,9 @@ function stringify(input) {
32
return result;
33
34
35
- const keys = Object.getOwnPropertyNames(input);
36
- const keyLength = keys.length;
37
const separator = "&";
+ const keys = Object.keys(input);
+ const keyLength = keys.length;
38
let valueLength = 0;
39
40
for (let i = 0; i < keyLength; i++) {
0 commit comments