import { isOn } from '@vue/shared';

const remove = (arr, el) => {
  const i = arr.indexOf(el);
  if (i > -1) {
    arr.splice(i, 1);
  }
  return arr;
};
const compareVersions = (v1, v2) => {
  const v1Parts = v1.split(".").map(Number);
  const v2Parts = v2.split(".").map(Number);
  for (let i = 0; i < Math.max(v1Parts.length, v2Parts.length); i++) {
    const v1Part = v1Parts[i] || 0;
    const v2Part = v2Parts[i] || 0;
    if (v1Part > v2Part) {
      return 1;
    }
    if (v1Part < v2Part) {
      return -1;
    }
  }
  return 0;
};
const isVersionGreaterOrEqual = (v1, v2) => {
  return compareVersions(v1, v2) >= 0;
};
function omitOnEvents(attrs) {
  const result = {};
  for (const key in attrs) {
    if (!isOn(key)) {
      result[key] = attrs[key];
    }
  }
  return result;
}

export { compareVersions, isVersionGreaterOrEqual, omitOnEvents, remove };
//# sourceMappingURL=general.mjs.map
