types

map

Key-value objects and the methods available on them.

A map is a key-value object. As a schema field it is written meta: map for a free-form object, or you reference another schema for a typed, nested object. A literal uses braces, as in { name: "Ana", age: 30 }.

marreta
user = { name: "Ana", age: 30 }
fields = user.keys()

Methods

NameSignatureSummary
map.hashas(key)Returns whether the map has a key.
map.keyskeys()Returns the keys.
map.valuesvalues()Returns the values.
map.sizesize()Returns the number of entries.
map.mergemerge(other)Returns a new map with another map merged in.
map.deletedelete(key)Removes a key and returns the map.