Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to README.md to add destructuring for module assignment. #3

Open
eg9y opened this issue May 24, 2019 · 0 comments
Open

Update to README.md to add destructuring for module assignment. #3

eg9y opened this issue May 24, 2019 · 0 comments

Comments

@eg9y
Copy link

eg9y commented May 24, 2019

In the same code on README.md, the assignment to the mail-listener5 module is this:
var MailListener = require("mail-listener5");

In my case, it didn't work and caused a TypeError:
TypeError: MailListener is not a constructor

I solved it by adding a curly braces around the MailListener variable name since we need to destructor it.

var { MailListener } = require("mail-listener5");

So a small update to the README.md in this case would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant