code: function(config, options) {
        // Make sure config is initialised
        if( ! config ) {
          config = JSON.parse(JSON.stringify(self.defaults));
        }
  
  
        var datasetConfig = JSON.parse(JSON.stringify(config));
        var optionsIn = JSON.parse(JSON.stringify(options));
        for (var k in optionsIn) {
          datasetConfig[k] = optionsIn[k];
        }
  
        return datasetConfig;
      }
docs: Sets options for passed in config, if !config then options will be applied to default config.
  @param {Object} config - config to which options will be applied
  @param {Object} options - options to be applied to the config