You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
857 B

2 years ago
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. Object.defineProperty(exports, "defaults", {
  6. enumerable: true,
  7. get: ()=>defaults
  8. });
  9. function defaults(target, ...sources) {
  10. for (let source of sources){
  11. for(let k in source){
  12. var ref;
  13. if (!(target === null || target === void 0 ? void 0 : (ref = target.hasOwnProperty) === null || ref === void 0 ? void 0 : ref.call(target, k))) {
  14. target[k] = source[k];
  15. }
  16. }
  17. for (let k1 of Object.getOwnPropertySymbols(source)){
  18. var ref1;
  19. if (!(target === null || target === void 0 ? void 0 : (ref1 = target.hasOwnProperty) === null || ref1 === void 0 ? void 0 : ref1.call(target, k1))) {
  20. target[k1] = source[k1];
  21. }
  22. }
  23. }
  24. return target;
  25. }