Official | const mixinParams = []
for (var i = 0; i < sortedParams.length; i++) {
var key = sortedParams[i]
var value = mixinQuery[key]
if (value && typeof value === 'string') {
value = value.replace(charRegex, '')
}
if (value != null) {
mixinParams.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value)))
}
}
| ready |
Unofficial 1 | const mixinParams = []
sortedParams.forEach(element => {
const key = element
let value = mixinQuery[key]
if (value && typeof value === 'string') {
value = value.replace(charRegex, '')
}
if (value !== null) {
mixinParams.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
}
})
| ready |
Unofficial 2 | const mixinParams = sortedParams
.map(key => {
let value = mixinQuery[key]
if (value && typeof value === 'string') {
value = value.replace(charRegex, '')
}
return value !== null ? `${encodeURIComponent(key)}=${encodeURIComponent(value)}` : null
})
.filter(value => {
return value !== null
})
| ready |
Unofficial 3 | const mixinParams = sortedParams
.map(key => {
const value = mixinQuery[key]
if (value && typeof value === 'string') {
return `${encodeURIComponent(key)}=${encodeURIComponent(value.replace(charRegex, ''))}`
}
return value !== undefined ? `${encodeURIComponent(key)}=${encodeURIComponent(value)}` : value
})
.filter(value => {
return value !== undefined
})
| ready |
Unofficial 4 | const mixinParams = sortedParams.map(key => {
const value = mixinQuery[key]
if (typeof value === 'string') {
return `${encodeURIComponent(key)}=${encodeURIComponent(value.replace(charRegex, ''))}`
}
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`
})
| ready |
Unofficial 5 | const mixinParams = sortedParams.map((key) => {
const value = mixinQuery[key].toString().replace(charRegex, "")
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`
})
| ready |
Unofficial 6 | const mixinParams = sortedParams.map(key => {
const value = mixinQuery[key]
if (typeof value === 'string') {
return `${encodeURIComponent(key)}=${encodeURIComponent(value.replace(charRegex, ''))}`
}
return `${key}=${value}`
})
| ready |
Unofficial 7 | const mixinParams = sortedParams.map(key => {
const value = mixinQuery[key]
if (typeof value === 'string') {
return `${encodeURIComponent(key)}=${encodeURIComponent(value.replaceAll(charRegex, ''))}`
}
return `${key}=${value}`
})
| ready |
Unofficial 8 | const mixinParams = []
for (let i = sortedParams.length - 1; i >= 0; --i) {
const key = sortedParams[i]
const value = mixinQuery[key]
mixinParams[i] =
typeof value === 'string'
? `${encodeURIComponent(key)}=${encodeURIComponent(value.replace(charRegex, ''))}`
: `${key}=${value}`
}
| ready |
Unofficial 9 | const mixinParams = []
for (let i = sortedParams.length - 1; i >= 0; --i) {
const key = sortedParams[i]
const value = mixinQuery[key]
mixinParams[i] =
key === 'wts'
? `${key}=${value}`
: `${encodeURIComponent(key)}=${encodeURIComponent(value.replace(charRegex, ''))}`
}
| ready |
Unofficial 10 | const mixinParams = []
for (let i = sortedParams.length - 1; i >= 0; --i) {
const key = sortedParams[i]
const value = mixinQuery[key]
mixinParams[i] =
key !== 'wts'
? `${encodeURIComponent(key)}=${encodeURIComponent(value.replace(charRegex, ''))}`
: `${key}=${value}`
}
| ready |