API / Belt / HashSetString

HashSetString

This module is Belt.HashSet specialized with key type to be a primitive type.

It is more efficient in general, the API is the same with Belt.HashSet except its key type is fixed, and identity is not needed(using the built-in one).

key

RES
type key = string

t

RES
type t

make

RES
let make: (~hintSize: int) => t

clear

RES
let clear: t => unit

isEmpty

RES
let isEmpty: t => bool

add

RES
let add: (t, key) => unit

copy

RES
let copy: t => t

has

RES
let has: (t, key) => bool

remove

RES
let remove: (t, key) => unit

forEachU

RES
let forEachU: (t, (. key) => unit) => unit

forEach

RES
let forEach: (t, key => unit) => unit

reduceU

RES
let reduceU: (t, 'c, (. 'c, key) => 'c) => 'c

reduce

RES
let reduce: (t, 'c, ('c, key) => 'c) => 'c

size

RES
let size: t => int

logStats

RES
let logStats: t => unit

toArray

RES
let toArray: t => array<key>

fromArray

RES
let fromArray: array<key> => t

mergeMany

RES
let mergeMany: (t, array<key>) => unit

getBucketHistogram

RES
let getBucketHistogram: t => array<int>