Hashtable implementation. This provides a 'length' property that's maintained throughout all updates, and has no restrictions upon the types of keys that may be used.
Creates a new Hash. If the copy_from object is specified, it copies the keys and values from that.
Returns the value of a key, or undefined if not set.
Returns true if this hashtable contains the specified key.
Sets key to val, then returns val.
Removes a key, returning the hashtable itself.
Sets a key if it doesn't already exist.
Sets a key if it doesn't already exist. Instead of taking a default value, takes a function of the key and evaluates that to get the default. This lets you defer construction costs until they're really needed.
Removes and returns the specified key.
Copies all properties of the specified object to this hash. Does not consider values inherited from the prototype.
Removes all entries from this hash.
Returns a list of all keys in this hash. The list is in unspecified order, and does not share structure with the Hash.
Returns a list of all values in this hash. The list is in unspecified order, and does not share structure with the Hash. Values retain their identities.
Returns a list of [key, value] arrays for this hash.
Returns a { key: value } JavaScript object with the contents of this hash. This shares structure with the hash; mutations to it affect the original Hash object and vis versa. Make a copy if you don't want this behavior.