Переход на JembaDb

This commit is contained in:
Book Pauk
2021-12-02 18:36:49 +07:00
parent 14ca2daa39
commit 0beaa611f6
8 changed files with 145 additions and 8 deletions

View File

@@ -38,6 +38,10 @@ function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function toUnixTime(time) {
return parseInt(time/1000);
}
function randomHexString(len) {
return crypto.randomBytes(len).toString('hex')
}
@@ -126,6 +130,7 @@ module.exports = {
bufferRemoveZeroes,
getFileHash,
sleep,
toUnixTime,
randomHexString,
touchFile,
spawnProcess,