UNPKG

nodejs-traceroute-ts

Version:

Node.js wrapper around tracert and traceroute process - TypeScript port

27 lines 811 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = __importDefault(require("./index")); try { const tracer = new index_1.default(); tracer .on('pid', (pid) => { console.log(`pid: ${pid}`); }) .on('destination', (destination) => { console.log(`destination: ${destination}`); }) .on('hop', (hop) => { console.log(`hop: ${JSON.stringify(hop)}`); }) .on('close', (code) => { console.log(`close: code ${code}`); }); tracer.trace('github.com'); } catch (ex) { console.log(ex); } //# sourceMappingURL=example.js.map