https://github.com/oriionn/buntp
A simple NTP client implementation for Bun
https://github.com/oriionn/buntp
bun javascript ntp typescript
Last synced: 4 months ago
JSON representation
A simple NTP client implementation for Bun
- Host: GitHub
- URL: https://github.com/oriionn/buntp
- Owner: oriionn
- License: mit
- Created: 2025-12-27T19:57:59.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-12-30T13:29:36.000Z (6 months ago)
- Last Synced: 2026-01-31T14:43:46.011Z (5 months ago)
- Topics: bun, javascript, ntp, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/buntp
- Size: 7.81 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# buntp
🧅 A simple NTP client implementation for Bun
This implementation was done following the [RFC 4330](https://datatracker.ietf.org/doc/html/rfc4330).
## Installation
```sh
bun add buntp
```
## Usage
```typescript
import { NTPClient } from "buntp";
const client = new NTPClient("your ntp server address");
let date = await client.sync(); // Returning a Date object
let rawRes = await client.rawSync(); // Returning a Packet object (see definition at src/models.ts)
```