import { Token } from './token' ; export abstract class TokenTypeHelper { public static isNumeric ( value ) { return ( /^[\+\-]?\d*\.?\d+(?:[Ee][\+\-]?\d+)?$/ ) . test ( String ( value ) ) ; } public static isArray ( token ) { return Array . isArray ( token ) ; } public static isString ( token ) { return typeof token === 'string' ; } public static isObject ( token ) { return typeof token === 'object' ; } public static isValue ( token ) { return TokenTypeHelper . isObject ( token ) || TokenTypeHelper . isNumeric ( token ) ; } }