Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
timer-stopwatch-two
Advanced tools
Readme
A fork of timer-stopwatch - the stopwatch and countdown clock module for node.js
All credit to Mick Crozier
npm install timer-stopwatch-two
The Gist new Stopwatch([countDownMS], [options])
Basic timers
var Stopwatch = require('timer-stopwatch');
var timer = new Stopwatch(60000); // A new countdown timer with 60 seconds
var stopwatch = new Stopwatch(); // A new count up stopwatch. Starts at 0.
###Event Methods
// Fires every 50ms by default. Change setting the 'refreshRateMS' options
timer.onTime(function(time) {
console.log(time.ms); // number of milliseconds past (or remaining);
});
// Fires when the timer is done
timer.onDone(function() {
console.log('Timer is complete');
});
// Fires when the timer is almost complete - default is 10 seconds remaining. Change with 'almostDoneMS' option
timer.onAlmostdone(function() {
console.log('Timer is almost complete');
});
//These methods are chainable
timer
.onTime(cb)
.onAlmostdone(cb)
.onDone(cb);
###Timer Methods
timer.start();
timer.stop();
timer.startstop(); // Toggles the running state
timer.reset(countDownMS); // optional countDownMS to reset countdown to that many milliseconds
###Properties
timer.ms; // Number of milliseconds on the clock
###Options
var options = {
refreshRateMS: 10, // How often the clock should be updated
almostDoneMS: 10000 // When counting down - this event will fire with this many milliseconds remaining on the clock
};
var timer = new Stopwatch(60000, options);
Unit and Integration tests (requires dev dependencies)
npm test
MIT License
FAQs
A fork of timer-stopwatch - a stopwatch and countdown timer for node
The npm package timer-stopwatch-two receives a total of 0 weekly downloads. As such, timer-stopwatch-two popularity was classified as not popular.
We found that timer-stopwatch-two 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.