Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
hypermap
Advanced tools
Readme
A more generic version of BiMap (as seen in C++ Boost, Google), that associates two or more values together, such that only one is required to recall all others.
npm install --save hypermap
iterable
is an Array or other iterable object whose elements are tuples (arrays).
Each item in each tuple is added to the new HyperMap. null
is treated as undefined
.
Associates two or more items. Throws if less than two arguments are passed. If neither item exists in the HyperMap, creates a new association, otherwise adds the items to the existing association. Throws if you try to associate an item already present in another association.
Returns the HyperMap
object.
Disassociate items. Selects an association based on ref
, then removes items
from it as directed. Does nothing if an association is not found. If, as a result
of this method, an association now has less than two items, it is destroyed.
Returns the HyperMap
object.
Returns the association that contains ref
, as a Set
, or undefined
if not found.
Returns a boolean indicating whether ref
is in the HyperMap
.
Copyright © 2015 Félix Saparelli, licensed under MIT
FAQs
Like a BiMap, but with N values instead of pairs
The npm package hypermap receives a total of 4 weekly downloads. As such, hypermap popularity was classified as not popular.
We found that hypermap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.