Работа над api reader, worker
This commit is contained in:
@@ -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
|
||||
};
|
||||
Reference in New Issue
Block a user