Code Cleanup™
This commit is contained in:
@@ -23,7 +23,7 @@ import type {ListPage, PageList} from "@type/page.ts";
|
||||
|
||||
export const capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);
|
||||
|
||||
export const nameRegex = new RegExp("(?!.*\/).+(?=\\.(md|json))");
|
||||
export const nameRegex = new RegExp("(?!.*/).+(?=\\.(md|json))");
|
||||
|
||||
export function mapToMap(pages: PageList): Map<string, ListPage[]> {
|
||||
const map = new Map();
|
||||
@@ -82,9 +82,9 @@ export function brightness(color: string) {
|
||||
return Color(color).isLight();
|
||||
}
|
||||
|
||||
export function base64ToBytes(base64: string) {
|
||||
export function base64ToBytes(base64: string): Uint8Array {
|
||||
const binString = atob(base64);
|
||||
// @ts-ignore
|
||||
// @ts-expect-error Some Function Missing
|
||||
return Uint8Array.from(binString, (m) => m.codePointAt(0));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user