mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 02:05:06 +02:00
Fix icon size issue, clean up reader interface, extract metadata from comics #113
This commit is contained in:
parent
03e39640be
commit
e3425acd75
15 changed files with 524 additions and 485 deletions
|
@ -29,26 +29,6 @@ const levenshteinDistance = (str1, str2, caseSensitive = false) => {
|
|||
}
|
||||
module.exports.levenshteinDistance = levenshteinDistance
|
||||
|
||||
const cleanString = (str) => {
|
||||
if (!str) return ''
|
||||
|
||||
// Now supporting all utf-8 characters, can remove this method in future
|
||||
|
||||
// replace accented characters: https://stackoverflow.com/a/49901740/7431543
|
||||
// str = str.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
|
||||
|
||||
// const availableChars = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
|
||||
// const cleanChar = (char) => availableChars.indexOf(char) < 0 ? '?' : char
|
||||
|
||||
// var cleaned = ''
|
||||
// for (let i = 0; i < str.length; i++) {
|
||||
// cleaned += cleanChar(str[i])
|
||||
// }
|
||||
|
||||
return cleaned.trim()
|
||||
}
|
||||
module.exports.cleanString = cleanString
|
||||
|
||||
module.exports.isObject = (val) => {
|
||||
return val !== null && typeof val === 'object'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue