SplitScript reference / Map<K, V> / containsKey
Map<K, V>.containsKey
Method
Map<K, V>.containsKey(key: K) -> bool where K: Equatable
Reports whether an equal key is present.
Values do not participate in this lookup.
Parameters
key: Key to find.
Effects: pure
Runtime behavior: available everywhere; synchronous
Examples
Check a route key
let routes = Map.new<String, u32>()
routes["Atrium"] = 12
let known = routes.containsKey("Atrium")