
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@rtbjs/network-speed-test
Advanced tools
Get the network speed in react.
To install @rtbjs/network-speed-test, simply use npm or yarn:
npm install @rtbjs/network-speed-test
# or
yarn add @rtbjs/network-speed-test
useNetworkSpeedTest hook from @rtbjs/network-speed-test.runTest returned from the hook.download and upload objects returned from the hook.import { useNetworkSpeedTest } from '@rtbjs/network-speed-test';
import { useEffect } from 'react';
const App = () => {
const { runTest, download, upload } = useNetworkSpeedTest();
useEffect(() => {
runTest();
}, []);
console.log('Download speed is:', download);
console.log('Upload speed is:', upload);
return <div>My component</div>;
};
export default App;
Run the upload test before the download test:
runTest({
runUploadBeforeDownload: true,
});
Run only the download test:
runTest({
upload: false,
});
Run only the upload test:
runTest({
download: false,
});
Types:
type UseNetworkSpeedTest = {
runTest: (options?: RunTestOptions) => void; // To run the test
download: {
isRunning: boolean; // If the download test is currently running
isComplete: boolean; // If the test has been completed
result: {
error?: any; // Error
elapsedTime?: number; // How much time the test took
meanClientMbps?: number; // The speed in Mbps
numberOfBytes?: number; // How much data has been sent
};
};
upload: {
isRunning: boolean; // If the upload test is currently running
isComplete: boolean; // If the test has been completed
result: {
error?: any; // Error
elapsedTime?: number; // How much time the test took
meanClientMbps?: number; // The speed in Mbps
numberOfBytes?: number; // How much data has been sent
};
};
isRunning: boolean; // If one of the tests is currently running
isComplete: boolean; // If the both tests have been completed
};
type RunTestOptions = {
download?: boolean; // Set to false if the download test is not needed
upload?: boolean; // Set to false if the upload test is not needed
runUploadBeforeDownload?: boolean; // Set to true if the upload test should be run first
};
Please report any issues and feature requests to: issues tracker
FAQs
Get the network speed in react.
We found that @rtbjs/network-speed-test 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.