
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fluent timer with laps, microtime (polyfill) + parsing, multiple timers, shorthand diffs & specifications
fluent timer with laps, microtime + parsing, multiple timers, (fallback to performance & Date), shorthand diffs & specifications
yarn add fliptime
npm i fliptime --save
const timer = require('fliptime')
uses microtime polyfill and if you install microtime it will require it when available (for node_gyp compat reasons) formatted with microseconds
timer.start('canada')
setTimeout(() => timer.end('canada').log('canada'), 500)
timer.start('canada')
const lapper = setInterval(() => {
timer.lap('canada')
}, 1000)
setTimeout(() => clearInterval(lapper), 10000)
timer.logLaps('canada')
timer.start('canada')
setTimeout(() => console.log(timer.end('canada').took('canada')), 500)
const sleepfor = require('sleepfor')
timer.start('eh')
timer.start('canada')
sleepfor(100)
timer.lap('canada')
timer.stop('eh')
sleepfor(100)
timer.lap('canada')
timer
.stop('canada')
.log('eh')
.log('canada')
.logLaps('canada')
// second param is whether to use laps
const lapTime = timer.msTook('canada', true)
timer.start('eh')
timer.stop('eh')
const microseconds = timer.took('eh')
const ms = timer.msTook('eh')
const parsed = timer.parsedTook()
diff for each: milliseconds, seconds, minutes, hours, days, years.
const now = Date.now()
sleepfor(60000)
const {ms, s, m, h, d, y} = timer.tillNow(now)
// ms === 60000
// s === 60
// m === 1
// h === 0
// d === 0
// y === 0
check that the difference is equal or greater than specification.
const then = Date.now()
sleepfor(60000)
// seconds, hours, minutes, days, years...
// or shorthand: s, h, m, d, y
//
// true: >= 60 seconds
const satisfies = timer.tillNowSatisfies(then, {seconds: 60})
const now = timer.microtime.now()
const micro = timer.parseMicro(now)
timer.times = {}
timer.laps = {}
timer.index = 0
timer.times[name].start
timer.times[name].end
timer.times[name].diff
FAQs
fluent timer with laps, microtime (polyfill) + parsing, multiple timers, shorthand diffs & specifications
The npm package fliptime receives a total of 4 weekly downloads. As such, fliptime popularity was classified as not popular.
We found that fliptime 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.