if(process.argv[1].lastIndexOf("thisismymodule.js") == process.argv[1] - "thisismymodule.js".length) is the check i'm using.