parseKind = function parseKind(kind, _ref2) {
  var rootSeparator = _ref2.rootSeparator,
      groupSeparator = _ref2.groupSeparator;

  var _kind$split = kind.split(rootSeparator, 2),
      _kind$split2 = _slicedToArray(_kind$split, 2),
      root = _kind$split2[0],
      remainder = _kind$split2[1];

  var groups = (remainder || kind).split(groupSeparator).filter(function (i) {
    return !!i;
  }); // when there's no remainder, it means the root wasn't found/split

  return {
    root: remainder ? root : null,
    groups: groups
  };
}
Parse out the component/kind name from a path, using the given separator config.