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

refactor: fetch add #1063

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: use included querystring module
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
  • Loading branch information
Alan Shaw committed Jul 26, 2019
commit 0f3e64052e7b5bb592107634f6b555529476bcdc
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"pull-to-stream": "~0.1.1",
"pump": "^3.0.0",
"qs": "^6.5.2",
"querystring": "^0.2.0",
"readable-stream": "^3.1.1",
"stream-to-pull-stream": "^1.7.2",
"tar-stream": "^2.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/querystring.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const QueryString = require('querystring')
const Qs = require('qs')

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

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