I am trying to create an app and the folder structure is as so:
./
   index.js
   options/
      basic.js
      help.js
js files in the options folder will have objects like so:
ping = {
    info: 'text',
    fn: function() {}
}
I want index.js to be able to do something like
var options = require('./options');
options['ping'].fn();
How do I export/require to make it work like this? My attempts have been futile.
I want to be able to do this without a JS compiler like ES