{"version":3,"file":"merge.cjs","names":[],"sources":["../../src/object/merge.ts"],"sourcesContent":["/**\n * Merges source objects into target object (shallow merge)\n * @param target - The target object\n * @param sources - The source objects\n * @returns Returns the target object\n * @example\n * const obj1 = { a: 1, b: { c: 2 } };\n * const obj2 = { b: { d: 3 }, e: 4 };\n * merge(obj1, obj2); // { a: 1, b: { d: 3 }, e: 4 }\n */\nexport function merge<T extends object, S extends object>(target: T, ...sources: S[]): T & S {\n  if (target == null) {\n    throw new TypeError('Cannot convert undefined or null to object');\n  }\n\n  const result = Object(target);\n\n  for (const source of sources) {\n    if (source != null) {\n      for (const key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          result[key] = source[key];\n        }\n      }\n    }\n  }\n\n  return result;\n}\n"],"mappings":";;;;;;;;;;;;AAUA,SAAgB,MAA0C,QAAW,GAAG,SAAqB;CAC3F,IAAI,UAAU,MACZ,MAAM,IAAI,UAAU,4CAA4C;CAGlE,MAAM,SAAS,OAAO,MAAM;CAE5B,KAAK,MAAM,UAAU,SACnB,IAAI,UAAU,MACP;OAAA,MAAM,OAAO,QAChB,IAAI,OAAO,UAAU,eAAe,KAAK,QAAQ,GAAG,GAClD,OAAO,OAAO,OAAO;CAAA;CAM7B,OAAO;AACT"}