Coder Social home page Coder Social logo

Example returns empty object. about js-libp2p HOT 4 CLOSED

sleep9 avatar sleep9 commented on July 18, 2024
Example returns empty object.

from js-libp2p.

Comments (4)

SgtPooki avatar SgtPooki commented on July 18, 2024

which example is this for? I can't find that code anywhere via https://github.com/search?q=org%3Alibp2p+%27const+%5Bnode1%2C+node2%5D+%3D+await+Promise.all%28%5B%27&type=code or searching locally

from js-libp2p.

sleep9 avatar sleep9 commented on July 18, 2024

Slightly modified from this example which is outdated it seems?
https://github.com/libp2p/js-libp2p/blob/v0.28.4/examples/pubsub/1.js

from js-libp2p.

achingbrain avatar achingbrain commented on July 18, 2024

I'm not sure this is a problem, this is just how console.log prints objects instantiated from ES6 classes.

You may find it more useful to log the peer id instead?

console.log('node1', node1.peerId)
// node1 PeerId(12D3Foo...)

from js-libp2p.

sleep9 avatar sleep9 commented on July 18, 2024

Your are correct good sir.

from js-libp2p.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.