
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@edgefirst-dev/server-timing
Advanced tools
A helper to collect measurements for the Server-Timing header
A helper to collect measurements for the Server-Timing header
Install the package:
bun add @edgefirst-dev/server-timing
Instantiate the timing collector:
import { TimingCollector } from "@edgefirst-dev/server-timing";
// You can instantiate this in the getLoadContext of Remix or React Router
let collector = new TimingCollector();
Take measurements:
collector.measure("my-metrict", "optional description", 100, async () => {
// do something
});
Get the Server-Timing header:
let headers = new Headers();
collector.toHeaders(headers);
[!TIP] Use this library in Remix or React Router applications to measure async code like HTTP requests or database queries, then collect the measurements and add them to the Server-Timing header.
You can also manually collect timings:
import { Timing } from "@edgefirst-dev/server-timing";
// measures are taken from the time this is created
let timing = new Timing("name", "description");
await doSomething(); // do something
timing.end(); // end the measurement
collector.add(timing); // add the timing to the collector
Each Timing can be used once. If you want to take different measurements, create a new Timing instance.
[!TIP] Use the
Collector#measuremethod to automatically create aTiminginstance and add it to the collector.
FAQs
A helper to collect measurements for the Server-Timing header
The npm package @edgefirst-dev/server-timing receives a total of 409 weekly downloads. As such, @edgefirst-dev/server-timing popularity was classified as not popular.
We found that @edgefirst-dev/server-timing 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
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.