CommonJS at Runtime
0 questions
What Node actually does when you call require: wrap the file in a function, run it once, and cache the resulting exports object for the life of the process. Interviewers probe the cache because it is simultaneously how you get singletons, how tests end up sharing state, and why a circular require hands back a half-built object.
questions
no questions here yet
this part of the tree is still being written
>
0 questions in this topic or below it