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

Why does require('intro.js') export an object with just introJs? #581

Closed
ibc opened this issue May 19, 2016 · 1 comment
Closed

Why does require('intro.js') export an object with just introJs? #581

ibc opened this issue May 19, 2016 · 1 comment

Comments

@ibc
Copy link

ibc commented May 19, 2016

var introJs = require('intro.js');

console.log(introJs);

output:

Object { introJs: function(targetElm) }

This has little sense. Why doesn't require('intro.js') directly export the introJs function instead?

So, instead of exports.introJs = introJs; this would be much better to check for window.module and export module.exports = introJs.

@odedniv
Copy link

odedniv commented Jun 21, 2016

Oh wow I was trying to figure this out for an hour now...
+1

@bozdoz bozdoz closed this as completed Apr 25, 2018
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

3 participants