Initial commit
This commit is contained in:
36 files changed
+5204
No files matched your search
@@ -0,0 +1,13 @@
|
||||
export function languageLabel(filename: string) {
|
||||
const extension = filename.split('.').pop()?.toUpperCase()
|
||||
return extension && extension.length <= 6 ? extension : 'TEXT'
|
||||
}
|
||||
|
||||
export function rawSnippetUrl(id: string) {
|
||||
return `http://127.0.0.1:6868/${encodeURIComponent(id)}?mode=raw`
|
||||
}
|
||||
|
||||
export function snippetUrl(id: string) {
|
||||
if (typeof window === 'undefined') return `/${encodeURIComponent(id)}`
|
||||
return new URL(`/${encodeURIComponent(id)}`, window.location.origin).toString()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { clsx, type ClassValue } from 'clsx'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
Reference in New Issue
Block a user