js if __main code example
Example: if __name__ == '__main__' js website
if (typeof require !== 'undefined' && require.main === module) {
fnName();
}
if (typeof require !== 'undefined' && require.main === module) {
fnName();
}