Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
namastey-hash-map
Advanced tools
A package implementing Hash Map data structure with various methods for efficient data storage and retrieval.
Brief Description: A JavaScript package implementing a Hash Map data structure with various important methods for efficient key-value pair management.
set(key, value): Adds a key-value pair to the hash map. If the key already exists, updates the value.
get(key):
Retrieves the value associated with the given key. Returns undefined
if the key does not exist.
delete(key):
Removes the key-value pair associated with the given key. Returns true
if the key was found and removed, otherwise false
.
has(key):
Checks if the hash map contains the specified key. Returns true
if the key exists, otherwise false
.
keys(): Returns an array of all keys in the hash map.
values(): Returns an array of all values in the hash map.
To install the package globally, run:
npm install -g namastey-hash-map
const HashMap = require('namastey-hash-map');
const map = new HashMap();
map.set('name', 'Sanjiv');
console.log(map.get('name')); // Output: Sanjiv
map.set('age', 25);
console.log(map.has('age')); // Output: true
map.delete('name');
console.log(map.get('name')); // Output: undefined
console.log(map.keys()); // Output: ['age']
console.log(map.values()); // Output: [25]
FAQs
A package implementing Hash Map data structure with various methods for efficient data storage and retrieval.
The npm package namastey-hash-map receives a total of 0 weekly downloads. As such, namastey-hash-map popularity was classified as not popular.
We found that namastey-hash-map demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.