merge.js 706 B

123456789101112131415161718192021222324
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.combineMerge = exports.overwriteMerge = void 0;
  4. var deepmerge_1 = require("@corex/deepmerge");
  5. var overwriteMerge = function () {
  6. var configs = [];
  7. for (var _i = 0; _i < arguments.length; _i++) {
  8. configs[_i] = arguments[_i];
  9. }
  10. return (0, deepmerge_1.merge)(configs, {
  11. arrayMergeType: 'overwrite'
  12. });
  13. };
  14. exports.overwriteMerge = overwriteMerge;
  15. var combineMerge = function () {
  16. var configs = [];
  17. for (var _i = 0; _i < arguments.length; _i++) {
  18. configs[_i] = arguments[_i];
  19. }
  20. return (0, deepmerge_1.merge)(configs, {
  21. arrayMergeType: 'combine'
  22. });
  23. };
  24. exports.combineMerge = combineMerge;