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.
Extension of TypeScript-STL Containers dispatching Events.
TSTL is an open-source project providing features of STL, migrated from C++ to TypeScript. You can enjoy the STL's own specific containers, algorithms and functors in the JavaScript. If TypeScript, you also can take advantage of type restrictions and generic programming with the TypeScript.
ECON is an extension module of such TSTL, providing special containers dispatching events. The special containers are almost similar with the original STL Containers, but you also can observe elements' I/O events with the special containers. Types of the event dispatched by the special containers are "insert"
, "erase"
and "refresh"
.
Installing ECON in NodeJS is very easy. Just install with the npm
.
# Install TSTL from the NPM module
npm install --save econ
import econ = require("econ");
function listener(event: econ.TreeMap.Event<number, string>): void
{
console.log("Event type is: " + event.type);
for (let it = event.first; !it.equals(event.last); it = it.next())
console.log("\t", "An element by that event:", it.value);
}
function main(): void
{
// CONSTRUCT EVENT TREE-MAP
let map: econ.TreeMap<number, string> = new econ.TreeMap();
map.addEventListener("insert", listener);
map.addEventListener("erase", listener);
// DISPATCHES INSERT EVENT
map.set(1, "One");
map.set(2, "Two");
map.set(3, "Three");
// DISPATCHES ERASE EVENT
map.erase(2);
map.erase(3);
}
main();
FAQs
Event Collections
The npm package econ receives a total of 2 weekly downloads. As such, econ popularity was classified as not popular.
We found that econ 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.