Skip to content
New issue

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

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

Already on GitHub? # to your account

Methods of requirejs #22

Open
nick4fake opened this issue May 18, 2014 · 2 comments
Open

Methods of requirejs #22

nick4fake opened this issue May 18, 2014 · 2 comments

Comments

@nick4fake
Copy link

I think it would be great to standardize some methods of RequireJS. For example, require.defined gives bool (if module was already loaded), and I don't think this is too specific to include it into AMD.

@jrburke
Copy link
Contributor

jrburke commented May 20, 2014

I think it would be better to standardize on the names proposed by the ES6 module loader. In the given example, I believe it is a .has() name. At least that is the plan I am hoping to take. But, I think we need to do a bit more implementation trials to make sure the ES6 names and behavior make sense.

In this particular case though, I would be happy to implement a .has (which would just be an alias for .defined in requirejs) if the other loader implementers wanted to start with that one, as I think it is fairly straightforward. If that ID already has an export in the module table, then return true.

@jakobo
Copy link

jakobo commented Jun 9, 2014

Just coming back to the AMD mailing list thread at https://groups.google.com/forum/#!searchin/amd-implement/defined/amd-implement/oYXr9XmgayY/u-8MVi4bRxgJ

There was some original concern around exposing the registry of defined modules as part of the public interface. Have these issues been resolved?

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

No branches or pull requests

3 participants