
Research
npm Malware Targets Telegram Bot Developers with Persistent SSH Backdoors
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
@esfx/collections-hashset
Advanced tools
Provides 'HashSet', a collection class that utilizes '@esfx/collection-core' and '@esfx/equatable'.
@esfx/collections-hashset
The @esfx/collections-hashset
package provides HashSet
, a collection class that utilizes @esfx/collection-core
and @esfx/equatable
.
npm i @esfx/collections-hashset
NOTE: The examples below use the following definition of
Person
:
import { Equatable, Equaler, Comparable, Comparer } from "@esfx/equatable"; class Person { constructor(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; } toString() { return `${this.firstName} ${this.lastName}`; } [Equatable.equals](other) { return other instanceof Person && this.lastName === other.lastName && this.firstName === other.firstName; } [Equatable.hash]() { return Equaler.defaultEqualer.hash(this.lastName) ^ Equaler.defaultEqualer.hash(this.firstName); } [Comparable.compareTo](other) { if (!(other instanceof Person)) throw new TypeError(); return Comparer.defaultComparer.compare(this.lastName, other.lastName) || Comparer.defaultComparer.compare(this.firstName, other.firstName); } }
import { HashSet } from "@esfx/collections-hashset";
// NOTE: see definition of Person above
const obj1 = new Person("Bob", "Clark");
const obj2 = new Person("Bob", "Clark");
const set = new Set(); // native ECMAScript Set
set.add(obj1);
set.add(obj2);
set.length; // 2
const hashSet = new HashSet();
hashSet.add(obj1);
hashSet.add(obj2);
hashSet.length; // 1
You can read more about the API here.
FAQs
Provides 'HashSet', a collection class that utilizes '@esfx/collection-core' and '@esfx/equatable'.
The npm package @esfx/collections-hashset receives a total of 503 weekly downloads. As such, @esfx/collections-hashset popularity was classified as not popular.
We found that @esfx/collections-hashset 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
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
Security News
pip, PDM, pip-audit, and the packaging library are already adding support for Python’s new lock file format.
Product
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.