chore: filter to query
This commit is contained in:
parent
ed65bb8127
commit
ffea333d55
22 changed files with 24 additions and 73 deletions
|
@ -1,8 +1,5 @@
|
|||
import sanitizeHtml from 'sanitize-html'
|
||||
import { shuffleArray } from '../utilities/index.js'
|
||||
|
||||
const BASE_URL = 'https://coryd.dev'
|
||||
|
||||
export default {
|
||||
encodeAmp: (string) => {
|
||||
if (!string) return
|
||||
|
@ -12,8 +9,4 @@ export default {
|
|||
},
|
||||
formatNumber: (number) => number.toLocaleString('en-US'),
|
||||
shuffleArray,
|
||||
sanitizeHtml: (html) => sanitizeHtml(html, {
|
||||
textFilter: (text) => text.replace(/"/g, '')
|
||||
}),
|
||||
absoluteUrl: (url) => (new URL(url, BASE_URL)).toString(),
|
||||
}
|
|
@ -9,7 +9,6 @@ export default {
|
|||
if (book['status'] === 'finished' && book['year']) return parseInt(book['year']) === parseInt(year)
|
||||
return ''
|
||||
}),
|
||||
sortByPlaysDescending: (data, key) => data.sort((a, b) => b[key] - a[key]),
|
||||
mediaLinks: (data, type, count = 10) => {
|
||||
if (!data || !type) return ''
|
||||
|
||||
|
|
Reference in a new issue