New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-internet-meter

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-internet-meter

Notify on internet speed changes

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
1.5K
-17.66%
Maintainers
1
Weekly downloads
 
Created
Source

react-internet-meter

Notify on internet speed changes

In later version default image will be removed. It is recommended to give address of image on your server/s. As it will give you more usefull and reliable values.

NPM JavaScript Style Guide

How it work ?

untitled-project_MBDXODJs_itmf

Install

npm  install --save react-internet-meter

Usage

import React from 'react'

import { ReactInternetSpeedMeter } from 'react-internet-meter'
import 'react-internet-speed-meter/dist/index.css'

const App = () => {
       <ReactInternetSpeedMeter  
            txtSubHeading="Internet is too slow"
            outputType="alert"
            customClassName={null}
            txtMainHeading="Opps..." 
            pingInterval={4000} // milliseconds 
            thresholdUnit='megabyte' // "byte" , "kilobyte", "megabyte" 
            threshold={100}
            imageUrl="https://res.cloudinary.com/dcwxsms2l/image/upload/v1610376487/pexels-ivan-samkov-6291574_bzqgps.jpg"
            downloadSize="1781287"  //bytes
            callbackFunctionOnNetworkDown={(speed)=>console.log(`Internet speed is down ${speed}`)}
            callbackFunctionOnNetworkTest={(speed)=>setwifiSpeed(speed)}
          />
}

export default App

ParameterTypeOptions
txtSubHeadingstringany string you want
outputTypestring"alert"/"modal"/"empty"
customClassNamestringcss class you want
txtMainHeadingstringany string you want
pingIntervalintegertime in milliseconds
thresholdUnitstring"byte"/"kilobyte"/"megabyte"
thresholdIntegerMinimum required value
callbackFunctionOnNetworkDownfunctionFunction that run on network down
callbackFunctionOnNetworkTestfunctionFunction that run after network check
imageUrlstringdummy image url
callbackFunctionOnNetworkTeststringimage size

License

MIT © rajanlagah

Medium post

alert-when-internet-speed-go-below-threshold

Note

Dont forget to give star to this repo on github...

Keywords

npm

FAQs

Package last updated on 29 Mar 2022

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