
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
hrtime-decorator
Advanced tools
Decorate any function to produce simple, high resolution logs of the time it took to complete the function.
process.hrtimeThis is for testing only, not for production!
var timer = require('timer-decorator');
myFunction = timer(myFunction, 'customName');
for (var k = 10; k > 0; k--) {
myFunction();
}
// [TIMER] "customName" 0.096919ms (0.096919 avg)
// [TIMER] "customName" 0.009224ms (0.0530715 avg)
// [TIMER] "customName" 0.010581ms (0.038908 avg)
// [TIMER] "customName" 0.011152ms (0.031969 avg)
// [TIMER] "customName" 0.012558ms (0.028086800000000002 avg)
// [TIMER] "customName" 0.011086ms (0.025253333333333336 avg)
// [TIMER] "customName" 0.006635ms (0.02259357142857143 avg)
// [TIMER] "customName" 0.012483ms (0.02132975 avg)
// [TIMER] "customName" 0.011924ms (0.020284666666666666 avg)
function myCustomLogger (msg) {
console.log(msg.toUpperCase());
}
timer.reporter.setLogger(myCustomLogger);
store arrayFAQs
A decorator to help measure any routine in high resolution
We found that hrtime-decorator 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.