@rocknerve/coolid
v0.1.3
Published
Only one function so far, `NanosNow()`, which returns an always-increasing `bigint` (think `Date.now()` but for nanoseconds).
Downloads
200
Readme
@rocknerve/coolid
Only one function so far, NanosNow()
, which returns an always-increasing bigint
(think Date.now()
but for nanoseconds).
Works in any JS environment with varying resolution depending on what’s available. (Most accurate if
Temporal
is available!)
Install:
npm i @rocknerve/coolid
Example usage:
const { NanosNow } = require("@rocknerve/coolid");
console.log(typeof NanosNow()); // --> `bigint`
console.log(NanosNow()); // --> eg. `1731901235059273212n`