exports, module.exports, and synchronous loading of modules - Deepstash

exports, module.exports, and synchronous loading of modules

If you’ve noticed above, every time we’ve printed a Module object, it had an exports property which has been an empty object so far. So far, every time we printed a Module object, we saw a loaded attribute on that object with a value of false. The Module Module uses the loaded attribute to track which modules have been loaded (true value) and which modules are still being loaded (false value) we can, for example, see the Index.Js


6 reads




Transport planner

The idea is part of this collection:

Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Related collections

Similar ideas to exports, module.exports, and synchronous loading of modules

The neuroscience of motivation

Neuroscience offers clues on how motivation works within the brain.

  • Taking action. The motor loop in the brain enables one-action-at-a-time control. (We can't sit down and stand up at the same time.)
  • The dopamine network explains whi...

Your Career And Your Life

Your Career And Your Life

We spend almost 25 percent of our adult life in our jobs, which most of us hate. So we basically wake up every morning and do something which we don’t even like to do.

We need to find a career that does not make us miserable all the time, and according to the Japanese conc...

Read & Learn

20x Faster





Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.


I agree to receive email updates