Skip to main content

index/functions/isTokenClassKey.md

isTokenClassKey(value): value is GalaChainTokenClassKey

True for a token class key OBJECT: collection, category, type and additionalKey are all non-empty strings (other fields, an instance say, are allowed). A string is never one: parse it with tryParseTokenClassKey. Never throws (a getter that throws is "not a key").

Parameters​

ParameterType
valueunknown

Returns​

value is GalaChainTokenClassKey

Example​

if (isTokenClassKey(value)) console.log(compositeKeyOf(value));