web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

profile.ts (352B)


      1 import type { ViewProfileEditFieldKey } from "$lib/types/views/profile";
      2 
      3 export const parse_view_profile_field_key = (val?: string | null): ViewProfileEditFieldKey | undefined => {
      4     switch (val) {
      5         case `name`:
      6         case `display_name`:
      7         case `about`:
      8             return val;
      9         default:
     10             return undefined;
     11     }
     12 };