Skip to content

Latest commit

 

History

History

hash-map-type

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

HashMapType

A type class for typed hash maps. Takes a key type and a value type as input and produces a hash map type which can store key / values of those types.

Note: These hash maps use open addressing and do not guarantee any particular ordering when iterating their keys / values.

Usage:

const {HashMapType, T} = realm;

const StringMap = new HashMapType(T.String, T.String);

const map = new StringMap();

map.set('hello', 'world');

console.log(map.get('hello'));