
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A library that extends native ES6 Map to bi-directional map.
npm install bidi-map
const BidiMap = require('bidi-map');
const bidiMap = new BidiMap([
[1, 'test'],
['foo', 'bar'],
]);
bidiMap instanceof BidiMap; // true
bidiMap instanceof Map; // true
bidiMap.get(1); // "test"
bidiMap.has('foo'); // true
bidiMap.exists('bar'); // true
bidiMap.getKeyOf('test'); // 1
const key = Symbol('unique');
bidiMap.set(key, 'test');
bidiMap.getKeysOf('test'); // [1, key]
A Bidirectional Map
Map ⏏
numberMap.<K, V>booleanKArray.<K>booleanundefinedMap ⏏Kind: Exported class
Extends: Map
Template: K, V
Create a new instance of the bidirectional-map
| Param | Type | Description |
|---|---|---|
| [iterable] | Iterable.<Array> | An iterable object |
numberGet the number of differed values in this map
Kind: instance property of BidiMap
Read only: true
Map.<K, V>Inherits from Map.set method.
Kind: instance method of BidiMap
| Param | Type |
|---|---|
| key | K |
| value | V |
booleanCheck if the map has the given value.
Kind: instance method of BidiMap
| Param | Type | Description |
|---|---|---|
| value | V | The given value |
KGet the first key of the given value or undefined if not exists.
Kind: instance method of BidiMap
| Param | Type |
|---|---|
| value | V |
Array.<K>Get the all the keys of the given value.
Kind: instance method of BidiMap
| Param | Type |
|---|---|
| value | V |
booleanInherits from Map.delete method.
Kind: instance method of BidiMap
| Param | Type |
|---|---|
| key | K |
undefinedInherits from Map.clear method.
Kind: instance method of BidiMap
© 2017 Moshe Simantov
Licensed under the Apache License, Version 2.0.
FAQs
A library that extends native ES6 Map to bi-directional map.
We found that bidi-map 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.