]}/* Sample servers, please use appropriate ones */
}))
conn=peer.connect(their_id||partner_id)
// Send the data.
internal_1=conn.send({data:send_data,from:my_id})
internal_2={
// Receive the data.
returnpeer.on('connection',function(conn){
conn.on('data',function({data,from}){
mutablereceived_data=data
mutablepartner_id=from
});
});
}
internals={
return{
conn,
internal_1,
internal_2}
}
import{text}from"@jashkenas/inputs"
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.