
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
JavaScript Set and Map native utilities have a maximum key size of 2 ^ 24 (16,777,216). BigBoiSet and BigBoiMap preserve the interface methods of the native Set and Map, while silently putting the items into bucketed instances of their respective native counterparts. Keys are hashed before bucketing, and therefore do not need to be uniformly distributed in order to be bucketed appropriately.
npm install --save bigboi
or
yarn add bigboi
Except for constructor, same interface as Set and Map
There are 2 variants of the Set and Map available.
import {
  BigBoiSetSimple,
  BigBoiMapSimple,
  BigBoiSetHashed,
  BigBoiMapHashed,
}
The Simple variants will simply push items into a Set/Map until there is no room, then move onto the next one, and so on. The lookup process is naive, and will simply go through the buckets of items to check if a given key is present. This means that any given lookup has a worst case of (total items) / (2 ^ 24). Bear in mind, lookups happen on reads/checks, but also on insertions, as we don't want to add the same item to multiple different buckets.
Map or SetThe Hashed variants will hash the keys and get a deterministic and uniformly distributed bucket assignment for each item. This means that there is O(1) reads and writes, allowing this solution to scale to an arbitrarily high number of items limited only by the available memory in the runtime environment.
const bigSet = new BigBoiSetSimple();
// Add elements
for (let i = 0; i < 20_000_000; i++) {
  bigSet.add('Hello' + i);
}
// Check if an element exists
bigSet.has('Hello0'); // returns true
// Remove an element
bigSet.delete('Hello0');
// Iterate over elements
bigSet.forEach((value) => {
  console.log(value);
});
// Return iterators
bigSet.entries();
bigSet.keys();
bigSet.values();
// Clear
bigSet.clear();
const bigMap = new BigBoiMapSimple();
// Add elements
for (let i = 0; i < 20_000_000; i++) {
  bigMap.add('Hello' + i, i);
}
// Get a value at a given key
bigMap.get('Hello0'); // returns 0
// Check if an element exists
bigMap.has('Hello0'); // returns true
// Remove an element
bigMap.delete('Hello0');
// Iterate over elements
bigMap.forEach((value, key) => {
  console.log(key, value);
});
// Return iterators
bigMap.entries();
bigMap.keys();
bigMap.values();
// Clear
bigMap.clear();
We welcome contributions! Please see our contributing guidelines for more information.
MIT
FAQs
Big Sets and Big Maps! Get around the 2 ^ 24 item limit in JS Sets and Maps.
The npm package bigboi receives a total of 12 weekly downloads. As such, bigboi popularity was classified as not popular.
We found that bigboi 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 found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.