code: function defaultSetter(path, payload, store, conf) {
      if (conf === void 0) { conf = {}; }
      var _a = formatSetter(path, payload, store, conf), command = _a.command, _path = _a._path, _payload = _a._payload;
      if (command === 'error')
          return _payload;
      return store[command](_path, _payload);
  }
docs: Creates a setter function in the store to set any state value
  Usage:
  `set('module/path/path.to.prop', newValue)`
  it will check first for existence of: `dispatch('module/path/path.to.prop')`
  if non existant it will execute: `commit('module/path/path.to.prop', newValue)`
  Import method:
  `store.set = (path, payload) => { return defaultSetter(path, payload, store, conf) }`
  
  @param {string} path the path of the prop to set eg. 'info/user/favColours.primary'
  @param {*} payload the payload to set the prop to
  @param {IInitialisedStore} store the store to attach
  @param {IDefaultConfig} [conf={}] user config
  @returns {*} the dispatch or commit function