A toolkit for network diagnostics including speed tests, port availability checks, and more.
Go to file
2020-08-12 16:29:03 +00:00
test fix(core): update 2019-11-23 16:07:04 +00:00
ts fix(core): update 2020-08-12 16:29:03 +00:00
.gitignore fix(core): update 2019-09-06 18:26:32 +02:00
.gitlab-ci.yml fix(dependencies update): update 2019-11-19 23:00:37 +00:00
.snyk fix(security): add snyk config 2019-11-19 23:01:21 +00:00
npmextra.json fix(core): update 2019-04-17 09:28:09 +02:00
package-lock.json fix(core): update 2020-08-12 16:29:03 +00:00
package.json fix(core): update 2020-08-12 16:29:03 +00:00
readme.md fix(dependencies update): update 2019-11-19 23:00:37 +00:00
tslint.json fix(core): update 2019-04-16 10:21:11 +02:00

@pushrocks/smartnetwork

network diagnostics

Status for master

build status coverage report npm downloads per month Known Vulnerabilities TypeScript node JavaScript Style Guide

Usage

import * as smartnetwork from 'smartnetwork';
const testSmartNetwork = new smartnetwork.SmartNetwork();
const run = async () => {
  // measure average speed over a period of 5 seconds
  // the structure of speedResult is self explanatory using TypeScript (or the linked TypeDoc above)
  const speedResult = testSmartNetwork.getSpeed(5000);

  //
  const isLocalPortAvailable: boolean = await testSmartNetwork.isLocalPortAvailable(1234);
  const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
    'google.com:80'
  );
  const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
    'google.com',
    80
  );
};

Contribution

We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can contribute one time or contribute monthly. :)

For further information read the linked docs at the top of this readme.

MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy

repo-footer