import { default } from "https://deno.land/x/source_map@0.8.0-beta.1/lib/array-set.js";
A data structure which is a combination of an array and a set. Adding a new member is O(1), testing for membership is O(1), and finding the index of an element is O(1). Removing elements from the set is not supported. Only strings are supported for membership.
Methods
Add the given string to this set.
What is the element at the given index?
Is the given string a member of this set?
What is the index of the given string in the array?
Return how many unique items are in this ArraySet. If duplicates have been added, than those do not count towards the size.
Returns the array representation of this set (which has the proper indices indicated by indexOf). Note that this is a copy of the internal array used for storing the members so that no one can mess with internal state.
Static Methods
Static method for creating ArraySet instances from an existing array.