Checks if a string has a specific type among all supported types in this library
The input string to check
The specific type to check for (e.g., 'decimal', 'roman', 'latin_letter')
True if the string has the specified type, false otherwise
hasType('123', 'decimal') // returns truehasType('IV', 'roman') // returns truehasType('A', 'latin_letter') // returns truehasType('invalid', 'roman') // returns falsehasType('', 'empty') // returns truehasType('xyz123', 'unknown') // returns truehasType(null, 'invalid') // returns true Copy
hasType('123', 'decimal') // returns truehasType('IV', 'roman') // returns truehasType('A', 'latin_letter') // returns truehasType('invalid', 'roman') // returns falsehasType('', 'empty') // returns truehasType('xyz123', 'unknown') // returns truehasType(null, 'invalid') // returns true
Checks if a string has a specific type among all supported types in this library