Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 0f3e640

Browse files
author
Alan Shaw
committed
fix: use included querystring module
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 0974b73 commit 0f3e640

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
"pull-to-stream": "~0.1.1",
8080
"pump": "^3.0.0",
8181
"qs": "^6.5.2",
82-
"querystring": "^0.2.0",
8382
"readable-stream": "^3.1.1",
8483
"stream-to-pull-stream": "^1.7.2",
8584
"tar-stream": "^2.0.1",

src/lib/querystring.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const QueryString = require('querystring')
3+
const Qs = require('qs')
44

55
// Convert an object to a query string INCLUDING leading ?
66
// Excludes null/undefined values
@@ -12,5 +12,5 @@ exports.objectToQuery = obj => {
1212
return obj
1313
}, {})
1414

15-
return Object.keys(qs).length ? `?${QueryString.stringify(qs)}` : ''
15+
return Object.keys(qs).length ? `?${Qs.stringify(qs, { arrayFormat: 'repeat' })}` : ''
1616
}

0 commit comments

Comments
 (0)