import dateformat from 'dateformat' ; const KEYWORDS_TO_FILTER = [ 'API' , 'OAuth1' , 'OAuth2' ] ; export function convertToDisplayDate ( epochTime ) { return dateformat ( epochTime , 'yyyy-mm-dd HH:MM:ss' ) ; } export function convertToHumanReadableDate ( epochTime ) { return dateformat ( epochTime , 'd mmmm, yyyy @ HH:MM Z' ) ; } export function getAppNameFromCredType ( name ) { return name . split ( ' ' ) . filter ( ( word ) => ! KEYWORDS_TO_FILTER . includes ( word ) ) . join ( ' ' ) ; } export function getStyleTokenValue ( name ) { const style = getComputedStyle ( document . body ) ; return style . getPropertyValue ( name ) ; }