Работа над api reader, worker

This commit is contained in:
Book Pauk
2019-01-11 22:20:25 +07:00
parent 33caf94988
commit 75bed20f0c
8 changed files with 181 additions and 4 deletions

View File

@@ -1,7 +1,14 @@
const crypto = require('crypto');
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function randomHexString(len) {
return crypto.randomBytes(len).toString('hex')
}
module.exports = {
sleep
sleep,
randomHexString
};