An open API service indexing awesome lists of open source software.

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

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)
```