In python, when you import a module the statements inside the 'if name == main' block of the imported module is not executed.
Is there any equivalent approach which can prevents the execution of unwanted statements in the imported module in javascript?