import { CATEGORIES , CategoryTypes , JsonEmoji } from './types' ; export const getHeight = ( value , screenHeight ) => typeof value === 'number' ? value : ( screenHeight / 100 ) * parseInt ( value . replace ( '%' , '' ) , 10 ) ; export const exhaustiveTypeCheck = ( arg , strict = true ) => { console . log ( `unhandled union case for : ${ arg }` ) ; if ( strict ) { throw new Error ( `unhandled union case for : ${ arg }` ) ; } } ; export const parseEmoji = ( emoji ) => ( { name : emoji . name , emoji : emoji . emoji , unicode_version : emoji . v , slug : emoji . name . replace ( / /g , '_' ) , } ) ; export const getCategoryIndex = ( disabledCategory , category ) => ( { index : CATEGORIES . filter ( ( name ) => ! disabledCategory . includes ( name ) ) . indexOf ( category ) , } ) ;