node.js - CoffeeScript main? -


i'd have main function run if not imported run , not imported.

is there equivalent python's name == "main" in coffeescript?

right i'm using

is_main = process.argv[1]==__filename if is_main     main() 

but don't know if more idiomatic exists, , noticed did not work older versions of coffeescript.

related js question

main() if require.main module


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -