Skip to content

Deno support #104

@acedward

Description

@acedward

This code does not work with deno
As it does not support proto by default
https://docs.deno.com/runtime/reference/cli/unstable_flags/#--unstable-unsafe-proto

import { NtpTimeSync } from "ntp-time-sync";
const timeSync = NtpTimeSync.getInstance({
  ntpDefaults: {
          minPoll: 10, // 2^10[s] aprox. 17 minutes
  },
});
console.log(await timeSync.getTime());

and it's used to determine how default options are merged

  // @see https://quickref.me/check-if-a-value-is-a-plain-object.html
  private static isPlainObject(v: any): boolean {
    return !!v && typeof v === "object" && (v.__proto__ === null || v.__proto__ === Object.prototype);
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions