Update:Paginated listening sessions

This commit is contained in:
advplyr 2022-06-04 10:52:37 -05:00
parent 0e1692d26b
commit 3171ce5aba
7 changed files with 122 additions and 49 deletions

View file

@ -124,4 +124,9 @@ module.exports.copyValue = (val) => {
module.exports.encodeUriPath = (path) => {
return path.replace(/\\/g, '/').replace(/%/g, '%25').replace(/#/g, '%23')
}
module.exports.toNumber = (val, fallback = 0) => {
if (isNaN(val) || val === null) return fallback
return Number(val)
}