JSPM

is-port-reachable

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2164860
  • Score
    100M100P100Q207672F
  • License MIT

Check if a local or remote port is reachable

Package Exports

  • is-port-reachable

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-port-reachable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-port-reachable Build Status

Check if a local or remote port is reachable

Install

$ npm install --save is-port-reachable

Usage

const isPortReachable = require('is-port-reachable');

isPortReachable(80, {host: 'google.com'}).then(reachable => {
    console.log(reachable);
    //=> true
});

API

isPortReachable(port, [options])

Returns a Promise for a boolean.

port

Type: number

options

host

Type: string
Default: localhost

Can be a domain or an IP.

timeout

Type: number
Default: 1000

Milliseconds to wait before giving up.

License

MIT © Sindre Sorhus