import { isString } from './chunk-J6NLSENU.mjs';
import { isObject } from './chunk-2JFFF2CE.mjs';
import { isEmptyArr } from './chunk-3RHP4BLC.mjs';
import { isArray } from './chunk-UGDKU24C.mjs';

// src/isEmpty.ts
function isEmpty(val) {
  if (!val) {
    return true;
  }
  if (isArray(val)) {
    return isEmptyArr(val);
  }
  if (isString(val)) {
    return val.trim().length === 0;
  }
  if (val instanceof Map || val instanceof Set) {
    return val.size === 0;
  }
  if (isObject(val)) {
    return Object.keys(val).length === 0;
  }
  return false;
}

export { isEmpty };
