Browser ping host tool.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.npmignore
LICENSE
README.md
index.d.ts
package.json
ping.js
ping.min.js
rollup.config.js
tsconfig.json
tslint.json
yarn.lock

README.md

ping-host

Browser ping host tool.

Usage

$ yarn add ping-host
import ping from 'ping-host';

await ping('taobao.com');
await ping('github.com', 'fluidicon.png');
await ping('github.com', 5000);
await ping('github.com', 'fluidicon.png', 3000);

or

<script src="https://unpkg.com/ping-host"></script>
<script>
const ret = await ping('taobao.com');
// or
ping('taobao.com').then(ret => console.log(ret));
</script>