
Research
Malicious npm Package Brand-Squats TanStack to Exfiltrate Environment Variables
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.
Simplified high resolution timing
Uses process.hrtime in Node.js and performance.now in browsers (accurate to 5 microseconds).
$ npm install time-span
import timeSpan from 'time-span';
const end = timeSpan();
timeConsumingFn();
console.log(end());
//=> 1745.3186
console.log(end.rounded());
//=> 1745
console.log(end.seconds());
//=> 1.7453186
const end = timeSpan()Returns a function, that when called, returns the time difference.
Elapsed milliseconds.
Elapsed milliseconds rounded.
Elapsed seconds.
Elapsed nanoseconds.
The performance-now package provides a high-resolution timer that is more accurate than Date.now(). It is similar to time-span in that it can be used to measure execution time, but it offers higher precision and is based on the performance.now() API.
Nanotimer is a more advanced timing library that allows for scheduling functions with nanosecond precision. It is more feature-rich compared to time-span, which is focused solely on measuring elapsed time.
Stopwatch-node is a simple stopwatch utility for Node.js. It provides similar functionality to time-span, allowing you to start, stop, and get the elapsed time, but with additional features like pausing and resuming the timer.
FAQs
Simplified high resolution timing
The npm package time-span receives a total of 5,184,440 weekly downloads. As such, time-span popularity was classified as popular.
We found that time-span 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.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.