require()
caches files that it executes.
The first time you require('./Object')
, it will run your code and place the exported object in require.cache
.
Subsequent calls will return the cached object immediately.
You could remove your module from the cache yourself, or use a getter, but those are bad ideas.