'use strict';

/*!
 * @techmely/utils
 * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com>
 * MIT Licensed
 */


// src/uniqueObject.ts
function uniqueObj(items, uniqueKey) {
  const map = /* @__PURE__ */ new Map();
  for (const item of items) {
    const key = item[uniqueKey];
    if (!map.has(key)) {
      map.set(key, item);
    }
  }
  return [...map.values()];
}

exports.uniqueObj = uniqueObj;
