This commit is contained in:
Iliyan Angelov
2025-09-14 23:24:25 +03:00
commit c67067a2a4
71311 changed files with 6800714 additions and 0 deletions

2
frontend/node_modules/nano-time/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,2 @@
.idea
node_modules

17
frontend/node_modules/nano-time/README.md generated vendored Normal file
View File

@@ -0,0 +1,17 @@
# NanoTime
Gets the current time in nanoseconds or microseconds.
In node.js you can get high resolution time with `process.hrtime()`, but it is from an unknown relative time, not epoch. So this library helps that by calculating the difference and adding it to the current time.
## Usage
Since javascript can't hold a nanosecond as an INT safely (_Number.MAX_SAFE_INTEGER_), we return a string instead.
```js
const now = require('nano-time');
now(); // '1476742925219947761' (returns a string)
now.micro(); // '1476742921398373'
now.microseconds(); // alias for now.micro();
```

18
frontend/node_modules/nano-time/index.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
'use strict';
const BigInt = require('big-integer');
const loadNs = process.hrtime();
const loadMs = new Date().getTime();
function nanoseconds() {
let diffNs = process.hrtime(loadNs);
return BigInt(loadMs).times(1e6).add(BigInt(diffNs[0]).times(1e9).plus(diffNs[1])).toString();
}
function microseconds() {
return BigInt(nanoseconds()).divide(1e3).toString();
}
module.exports = nanoseconds;
module.exports.microseconds = module.exports.micro = microseconds;

30
frontend/node_modules/nano-time/package.json generated vendored Normal file
View File

@@ -0,0 +1,30 @@
{
"name": "nano-time",
"version": "1.0.0",
"description": "Current Time in Nanoseconds",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sazze/node-nanotime.git"
},
"keywords": [
"nanoseconds",
"time",
"date",
"current",
"time",
"microseconds"
],
"author": "Kevin Smithson <ksmithson@sazze.com>",
"license": "ISC",
"bugs": {
"url": "https://github.com/sazze/node-nanotime/issues"
},
"homepage": "https://github.com/sazze/node-nanotime#readme",
"dependencies": {
"big-integer": "^1.6.16"
}
}