
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
stopwatch-node
Advanced tools
This is inspired by the Spring-Stopwatch. Written in Typescript
, 100%` Test Coverage.
npm install stopwatch-node
import { StopWatch } from 'stopwatch-node';
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
(async () => {
const sw = new StopWatch('sw');
sw.start('Task 1');
await sleep(1000);
sw.stop();
// whether the stop watch is currently running
console.info(sw.isRunning());
const task2Name = 'Task 2';
sw.start(task2Name);
await sleep(1500);
sw.stop();
sw.start('Task 3');
await sleep(500);
sw.stop();
sw.start('Task 4');
await sleep(300);
sw.stop();
console.info(`Short Summary: ${sw.shortSummary()}`);
console.info(`Task Count: ${sw.getTaskCount()}`);
// a table describing all tasks performed
sw.prettyPrint();
const task2 = sw.getTask(task2Name);
console.info(`'${task2Name}' took ${task2?.timeMills} and percentage is ${task2?.percentage}`);
})();
------------------------------------------
ms % Task name
------------------------------------------
1000 30.21 Task 1
1504 45.44 Task 2
505 15.26 Task 3
301 9.09 Task 4
'Task 2' took 1506 and percentage is 45.47
FAQs
stopwatch for nodejs inspired by Spring Stopwatch
The npm package stopwatch-node receives a total of 3,274 weekly downloads. As such, stopwatch-node popularity was classified as popular.
We found that stopwatch-node 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.