1.0.0 • Published 11 months ago
ntpc v1.0.0
ntpc
Tiny NTP client. Works with NTP v3 and v4
Installation
yarn add ntpc
Usage
import { getTime } from 'ntpc';
const { currentTime } = await getTime('time.apple.com', 123);
console.log(currentTime); // Date(2023-06-08T06:46:08.000Z)
Configuration
import { getTime } from 'ntpc';
const { currentTime } = await getTime('time.apple.com', 123, {
version: 3,
});
console.log(currentTime); // Date(2023-06-08T06:46:08.000Z)
License
ntpc
is WTFPL licensed.
1.0.0
11 months ago