libp2p / js-peer-id

peer-id implementation in JavaScript. Deprecated; use https://github.com/libp2p/js-libp2p-peer-id instead.
https://github.com/libp2p/js-libp2p-peer-id
MIT License
81 stars 44 forks source link

fix: Update README.md #111

Closed AgentJ-WR closed 4 years ago

AgentJ-WR commented 4 years ago

The example in the readme does not work out of the box. This one will work just fine.

jacobheun commented 4 years ago

The current version (0.13.x) of this library uses async/await. It looks like you are using a previous version, which used callbacks. You can see the docs for 0.12.x at https://github.com/libp2p/js-peer-id/tree/0.12.x.