A simple NTP client implementation for Bun https://www.npmjs.com/package/buntp
  • TypeScript 100%
Find a file
2025-12-30 14:29:33 +01:00
examples chore: README feat: rename syncRaw to rawSync 2025-12-27 21:27:49 +01:00
src doc: add jsdoc to constructor 2025-12-30 14:29:33 +01:00
.gitignore feat: project 2025-12-27 20:58:56 +01:00
.npmignore chore: npmignore 2025-12-27 21:21:07 +01:00
LICENSE feat: project 2025-12-27 20:58:56 +01:00
package.json chore: examples chore: package.json feat: typed returns 2025-12-27 21:18:49 +01:00
README.md doc: remove first implementation post scriptum 2025-12-30 14:01:22 +01:00
tsconfig.json feat: project 2025-12-27 20:58:56 +01:00

buntp

🧅 A simple NTP client implementation for Bun

This implementation was done following the RFC 4330.

Installation

bun add buntp

Usage

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)