Yeah, the topic's name is completely wrong. I realized it just right after
posting but couldn't fix.
What I actually mean is:
Look, require('foo') is nothing but global var 'foo' except that it is
scoped on module's level. Typically "it is set" by Node depending on your
dirs layout. But why it couldn't be set from javascript?
Why it is useful:
The ability to have global vars is useful in general. The simplest use
case this feature will enable is an mocking something that couldn't be
mocked globally for the entire app. There are surely other good (perhaps
rare) use cases.
Is it deserves to be adopted?
That's a question. There is a corresponding topic in the
nodejs-dev<https://groups.google.com/forum/?fromgroups#!forum/nodejs-dev>mailing
list.
PS: Sorry for the wrong title. This topic associates too much in my mind
with dependency injection.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en