Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A bidirectional map based on the ES6 Map object containing additional methods to retrive keys by values, delete key-value pairs by values and check the existence of keys by values.
A bidirectional map based on the ES6 Map object containing additional methods to retrive keys by values, delete key-value pairs by values and check the existence of keys by values. The module contains two classes: BiMap
& WeakBiMap
based on Map
& WeakMap
respectively.
npm install --save bim
Same as normal Map
& WeakMap
, plus the getKey
, hasValue
& deleteValue
methods.
import { WeakBiMap } from 'bim'
// create objects to use as keys
const a = {
i: 'foo',
j: 8,
}
const b = {
k: 'bar',
p: 11,
}
// create the bidirectional weak map
const wbm = new WeakBiMap()
wbm.set(a, 5)
wbm.set(b, 6)
wbm.deleteValue(5) // now only has { k: 'bar', p: 11 } => 6
wbm.hasValue(5) // false
const c = {
h: 'quux',
z: 100,
}
wbm.set(c, 7)
wbm.hasValue(7) // true
wbm.getKey(7) // { h: 'quux', z: 100 }
FAQs
A bidirectional map based on the ES6 Map & WeakMap objects
The npm package bim receives a total of 15 weekly downloads. As such, bim popularity was classified as not popular.
We found that bim 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.