New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rn-speed-test

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-speed-test

react native network speed

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Native Speed Test

react native network speed test package

Installation

npm install rn-speed-test

Usage

import { useState } from 'react';
import { View, Text } from 'react-native';
import RnSpeedTestProvider, { useRnSpeedTest, RnSpeedTestConfig,} from 'rn-speed-test';

const SomeComponent = ()=>{
  const { networkSpeed, networkSpeedText } = useRnSpeedTest();
  return(
    <View>
      <Text>{networkSpeed||'calculating'}</Text>
    </View>)
}

const App = ()=>{
  const [error,setError] = useState('');
  const config:RnSpeedTestConfig = {
    token: 'YOUR_TOKEN__HERE',
    timeout: 10000,
    https: true,
    urlCount: 5,
    bufferSize: 8,
    unit: 'MBps',
  };
  return (
    <RnSpeedTestProvider initialConfig={config} onError={setError}>
      //  Rest of the app ...
    </RnSpeedTestProvider>
  )
}
export default App

License

MIT


FAQ

How to get app token ?

Go on fast.com, open your browser devtools, go on Network tab and copy the token on the request url that looks like https://api.fast.com/netflix/speedtest?https=true&token=<the-token>&urlCount=5

Keywords

FAQs

Package last updated on 17 Oct 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc