
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@slime/stopwatch
Advanced tools
a class for handling and printing elapsed time in ms, under the hood is just comparing timestamps with Date.now().
simple class utility for tracking amount of time elapsed in milliseconds (ms).
version 1.1.0: added typescript type definitions for StopWatch class
installation from terminal/CMD line
npm i @slime/stopwatch
usage: first instantiate a new StopWatch object instance from the StopWatch class
const StopWatch = require("@slime/stopwatch");
let stopWatch = new StopWatch();
API to start, stop, resume, reset with:
stopWatch.startTimer();
stopWatch.stopTimer();
stopWatch.startTimer();
stopWatch.reset();
getters API to query number of ms elapsed and display time elapsed as minutes/seconds/ms string:
stopWatch.getTimeElapsedInMs; // returns number of time elapsed in ms
stopWatch.getTimeElapsedInStopWatchFormatString; // returns mins/secs/ms in 00:00:00 format
start timer and show time elapsed after 1.5 seconds
const StopWatch = require("@slime/stopwatch");
let stopWatch = new StopWatch();
console.log(stopWatch.getTimeElapsedInMs);
console.log(stopWatch.getTimeElapsedInStopWatchFormatString);
stopWatch.startTimer();
setTimeout(()=>{
stopWatch.stopTimer();
console.log(stopWatch.getTimeElapsedInMs);
console.log(stopWatch.getTimeElapsedInStopWatchFormatString);
}, 1500);
FAQs
a stopwatch class utility for starting, pausing, resetting and getting elapsed time in milliseconds (ms), under the hood is just comparing timestamps with Date.now().
The npm package @slime/stopwatch receives a total of 45 weekly downloads. As such, @slime/stopwatch popularity was classified as not popular.
We found that @slime/stopwatch demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.