What is the NodeJS equivalent of Python's if name == "__main__"

Whereas in Python you would use

if name == "__main__":
    # TODO Your code goes here

in NodeJS you can simply use

if (require.main === module) {
    // TODO Your code goes here
}