mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-22 00:07:52 +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)
|
||
|
}
|
||
|
}
|
||
|
}
|