Add remove group, format

This commit is contained in:
Jon Staab
2024-08-16 10:50:38 -07:00
parent 437cfa7bc4
commit bd8fcd3264
51 changed files with 800 additions and 435 deletions
+6 -8
View File
@@ -1,9 +1,9 @@
import Fuse from "fuse.js"
import type {IFuseOptions, FuseResult} from 'fuse.js'
import {throttle} from 'throttle-debounce'
import {writable} from 'svelte/store'
import {sortBy} from '@welshman/lib'
import {browser} from '$app/environment'
import type {IFuseOptions, FuseResult} from "fuse.js"
import {throttle} from "throttle-debounce"
import {writable} from "svelte/store"
import {sortBy} from "@welshman/lib"
import {browser} from "$app/environment"
export const parseJson = (json: string) => {
if (!json) return null
@@ -15,8 +15,7 @@ export const parseJson = (json: string) => {
}
}
export const getJson = (k: string) =>
browser ? parseJson(localStorage.getItem(k) || "") : null
export const getJson = (k: string) => (browser ? parseJson(localStorage.getItem(k) || "") : null)
export const setJson = (k: string, v: any) => {
if (browser) {
@@ -61,7 +60,6 @@ export const createSearch = <V, T>(data: T[], opts: SearchOptions<V, T>) => {
}
}
export const secondsToDate = (ts: number) => new Date(ts * 1000)
export const dateToSeconds = (date: Date) => Math.round(date.valueOf() / 1000)