2.6.1 • Published 2 years ago
ng-speed-test v2.6.1
ng-speed-test

Index
About
Simple Angular 2+ service for checking internet speed
- Try out the demo to see it in action!
- Visit my website for other cool projects!
Setup
Install Node
npm install ng-speed-test --saveImport module
Import
SpeedTestModuleby adding the following to your parent module (i.e.app.module.ts):import { SpeedTestModule } from 'ng-speed-test'; @NgModule({ ... imports: [ SpeedTestModule, ... ], ... }) export class AppModule {}
Use service
- Checkout the demo and it's code for more examples.
import {SpeedTestService} from 'ng-speed-test';
@Injectable()
export class TechCheckService {
constructor(
private speedTestService:SpeedTestService
) {
this.speedTestService.getMbps().subscribe(
(speed) => {
console.log('Your speed is ' + speed);
}
);
}Documentation
Functions
getBps()Get the current internet speed in BPS (bytes per second).getKbps()Get the current internet speed in KBPS (kilobytes per second).getMbps()Get the current internet speed in MBPS (megabytes per second).
Contributing
Thanks
Issues
If you find any issues feel free to open a request in the Issues tab. If I have the time I will try to solve any issues but cannot make any guarantees. Feel free to contribute yourself.
Deploy
Demo
- Run
npm installto get packages required for the demo and then runnpm run demoto run locally.
Generate Docs
- Run
npm run docs:build
Update Version
- Update version
package.jsonfiles in both the root anddist/directory following Semantic Versioning (2.0.0).
Build
- Run
npm run buildfrom root.
Test
- Copy
dist/contents intodemo/node_modules/ng-speed-test/- Run from root:
cp -fr dist/* demo/node_modules/ng-speed-test/
- Run from root:
- Run
ng servefromdemo/ - Run
ng build --prodfromdemo/
NPM Release
- Run
npm publishfromdist/directory.
Update Changelog
- Add updates to
CHANGELOG.mdin root.
2.5.0
2 years ago
2.4.0
2 years ago
2.6.1
2 years ago
2.6.0
2 years ago
2.3.3
2 years ago
2.3.2
3 years ago
2.2.0
4 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.6
5 years ago
2.0.5
5 years ago
2.0.3
5 years ago
2.0.4
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
1.4.0
5 years ago
1.3.0
5 years ago
1.2.1
5 years ago
2.0.0
5 years ago
1.2.0
5 years ago
1.1.0
6 years ago
1.0.0
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago