valtech-sd / amqp-cacoon

AmqpCacoon is an abstraction around node-amqp-connection-manager that provides a simple interface with flow control, retries, reconnects, and more included out of the box.
MIT License
5 stars 4 forks source link

When using in JavaScrip the requires is not documented and is also not the usual simple "requires('some-pkg')" #21

Closed EricWasTakenMJD closed 3 years ago

EricWasTakenMJD commented 3 years ago

For using in JavaScript, the user has to require AMQP Cacoon like this:

const AmqpCacoon = require('amqp-cacoon').default;

or

const { default: AmqpCacoon } = require('amqp-cacoon');

This needs to be included in the README (perhaps the second form is better and more clear.)

EricWasTakenMJD commented 3 years ago

Handling in https://github.com/valtech-sd/amqp-cacoon/pull/25