mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-08 00:08:14 +01:00
13 lines
327 B
JavaScript
13 lines
327 B
JavaScript
export default {
|
|
methods: {
|
|
buildQuerystring(obj, opts = { includePrefix: false }) {
|
|
let querystring = Object
|
|
.entries(obj)
|
|
.map(([key, val]) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`)
|
|
.join('&')
|
|
|
|
return (opts.includePrefix ? '?' : '').concat(querystring)
|
|
}
|
|
}
|
|
}
|