Skip to content

Clarify readme #50

@tony-ist

Description

@tony-ist

Please, clarify in the readme that it is impossible with this library to get the same value using another object as a key that is structurally identical to the first key object. Because this is what HashMap is usually used for.
For example:

const key1 = { k: 'v' }
const key2 = { k: 'v' }
map.set(key1, 'val1')
map.set(key2, 'val2')
// actual behavior is that key1 and key2 have different hashes, so:
map.get(key1) // --> 'val1'
map.get(key2) // --> 'val2'
// expected behavior (same hashes):
map.get(key1) // --> 'val2'
map.get(key2) // --> 'val2'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions