2.6.1 • Published 9 months 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 --save
Import module
Import
SpeedTestModule
by 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 install
to get packages required for the demo and then runnpm run demo
to run locally.
Generate Docs
- Run
npm run docs:build
Update Version
- Update version
package.json
files in both the root anddist/
directory following Semantic Versioning (2.0.0).
Build
- Run
npm run build
from 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 serve
fromdemo/
- Run
ng build --prod
fromdemo/
NPM Release
- Run
npm publish
fromdist/
directory.
Update Changelog
- Add updates to
CHANGELOG.md
in root.
2.5.0
9 months ago
2.4.0
9 months ago
2.6.1
9 months ago
2.6.0
9 months ago
2.3.3
9 months ago
2.3.2
1 year ago
2.2.0
3 years ago
2.1.1
3 years ago
2.1.0
4 years ago
2.0.6
4 years ago
2.0.5
4 years ago
2.0.3
4 years ago
2.0.4
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
1.4.0
4 years ago
1.3.0
4 years ago
1.2.1
4 years ago
2.0.0
4 years ago
1.2.0
4 years ago
1.1.0
4 years ago
1.0.0
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago