import { BaseMessage , Events , Commands } from '../../twitch' ; import * as constants from '../constants' ; export const isAuthenticationFailedMessage = ( message ? ) => typeof message !== 'undefined' && message . command === Commands . NOTICE && message . channel === '' && message . message === 'Login authentication failed' ; export const getEventNameFromMessage = ( message ) => typeof message !== 'undefined' ? message . command || message . event : Events . ALL ; export const isUserAnonymous = ( value ) => constants . ANONYMOUS_USERNAME_RE . test ( value ) ;