fix(formatting): Fix minor formatting issues and newline consistency across project files

This commit is contained in:
2025-05-03 18:56:00 +00:00
parent 7d087e39ef
commit def467a27b
9 changed files with 53 additions and 50 deletions

View File

@ -16,9 +16,7 @@ You can perform a hop-by-hop traceroute to measure latency per hop. Falls back t
```typescript
const hops = await myNetwork.traceroute('google.com', { maxHops: 10, timeout: 5000 });
hops.forEach(h =>
console.log(`${h.ttl}\t${h.ip}\t${h.rtt === null ? '*' : h.rtt + ' ms'}`),
);
hops.forEach((h) => console.log(`${h.ttl}\t${h.ip}\t${h.rtt === null ? '*' : h.rtt + ' ms'}`));
```
This command will download `@push.rocks/smartnetwork` and add it to your project's `package.json` file.
@ -44,6 +42,7 @@ const myNetwork = new SmartNetwork();
### Performing a Speed Test
You can measure the network speed using the `getSpeed` method. It supports optional parameters:
- `parallelStreams`: number of concurrent streams (default: 1)
- `duration`: test duration in seconds (default: fixed segments)
@ -143,6 +142,7 @@ console.log(`Public IPv6: ${publicIps.v6}`);
The `@push.rocks/smartnetwork` package provides an easy-to-use, comprehensive suite of tools for network diagnostics and monitoring, encapsulating complex network operations into simple asynchronous methods. By leveraging TypeScript, developers can benefit from type checking, ensuring that they can work with clear structures and expectations.
These examples offer a glimpse into the module's utility in real-world scenarios, demonstrating its versatility in handling common network tasks. Whether you're developing a network-sensitive application, diagnosing connectivity issues, or simply curious about your network performance, `@push.rocks/smartnetwork` equips you with the tools you need.
### Plugin Architecture
You can extend `SmartNetwork` with custom plugins by registering them at runtime: