INNER CODE UNIT · JavaScript
warn
feross/simple-peer · index.js:19
function warn (message) {
console.warn(message)
}
/**
* WebRTC peer connection. Same API as node core `net.Socket`, plus a few extra methods.
* Duplex stream.
* @param {Object} opts
*/
class Peer extends stream.Duplex {
constructor (opts) {
opts = Object.assign({
allowHalfOpen: false
}, opts)
super(opts)
this._id = randombytes(4).toString('hex').slice(0, 7)