chore: transform libp2p into monorepo

This commit is contained in:
Vasco Santos
2021-09-24 10:26:19 +02:00
parent a335fda852
commit 01f1be8fbd
164 changed files with 396 additions and 359 deletions

View File

@ -0,0 +1,18 @@
'use strict'
const crypto = require('libp2p-crypto')
const constants = require('./constants')
/**
* @param {number} length
*/
function rnd (length) {
if (!length) {
length = constants.PING_LENGTH
}
return crypto.randomBytes(length)
}
module.exports = {
rnd
}