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-decorator
Advanced tools
Readme
A simple Promise-aware ES7 timer decorator. Just logs the processing time for the given function, or the time until the promise resolves (ignores rejected promises). Note that the promise itself adds ~35-40ms in my basic testing.
npm install --save-dev timer-decorator
import timer from 'timer-decorator';
class Foo {
@timer
myMethod() {
// ...
}
}
will log something like:
Foo[0].myMethod: 123.456ms
The [0]
is the instance #.
To enable or disable the timer, call:
timer.enable(this);
timer.disable(this);
where this
is the class instance.
timer.release(this);
to release the object and allow for gc to clean it. Note that you probably
shouldn't be using this in production anyway, so it's somewhat irrelevant if
you don't do this (I'm just writing it for you to be aware that you will
keep around every object that has a timer in memory, forever, if release
isn't called).
FAQs
ES7 promise-aware timer decorator
The npm package timer-decorator receives a total of 0 weekly downloads. As such, timer-decorator popularity was classified as not popular.
We found that timer-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
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.