index is a function of my indeks module. It constructs an index of the folder. It's pretty configurable, but I'm using all default settings right now. It's default settings import all *.js files in a folder using require(), convert their names to proper node variable names, and assign them to an object which it returns. You should browse the code for a good example of functional JS programming. Well, I think it's good anyway, I wrote it. https://github.com/joshuafcole/indeks