npm

Need private packages and team management tools?Check out npm Orgs. »

@pushrocks/smartnetwork

1.1.14 • Public • Published

@pushrocks/smartnetwork

network diagnostics

Availabililty and Links

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
  );
};

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

Keywords

none

install

npm i @pushrocks/smartnetwork

Downloadsweekly downloads

1

version

1.1.14

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability