type Ogable = "description" | "title" | "image" ; type Rec = Record < Ogable , string | undefined | null > ; export function ogMeta ( record ) { const meta = { } ; for ( const [ key , value ] of Object . entries ( record ) ) { if ( value === undefined ) continue ; meta [ key ] = value ; meta [ `og:${ key }` ] = value ; } return meta ; }