3.0.2 • Published 10 months ago

@push.rocks/smartnetwork v3.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@pushrocks/smartnetwork

network diagnostics

Availabililty and Links

Status for master

Status CategoryStatus Badge
GitLab Pipelinespipeline status
GitLab Pipline Test Coveragecoverage report
npmnpm downloads per month
SnykKnown Vulnerabilities
TypeScript SupportTypeScript
node Supportnode
Code StyleCode Style
PackagePhobia (total standalone install weight)PackagePhobia
PackagePhobia (package size on registry)PackagePhobia
BundlePhobia (total size when bundled)BundlePhobia
Platform supportSupports Windows 10 Supports Mac OS X

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: smartnetwork.SpeedResult = testSmartNetwork.getSpeed(5000);

  // you can check for local ports before trying to bind to it from your nodejs program
  const isLocalPortUnused: boolean = await testSmartNetwork.isLocalPortUnused(1234);

  // you can run basic port checks on remote domains.
  const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
    'google.com:80'
  );

  // just another way to call for the same thing as above
  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