wrapTWithDefaultNs.js 723 B

12345678910111213141516171819202122
  1. "use strict";
  2. var __assign = (this && this.__assign) || function () {
  3. __assign = Object.assign || function(t) {
  4. for (var s, i = 1, n = arguments.length; i < n; i++) {
  5. s = arguments[i];
  6. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  7. t[p] = s[p];
  8. }
  9. return t;
  10. };
  11. return __assign.apply(this, arguments);
  12. };
  13. Object.defineProperty(exports, "__esModule", { value: true });
  14. function wrapTWithDefaultNs(oldT, ns) {
  15. if (typeof ns !== 'string')
  16. return oldT;
  17. var t = function (key, query, options) {
  18. return oldT(key, query, __assign({ ns: ns }, options));
  19. };
  20. return t;
  21. }
  22. exports.default = wrapTWithDefaultNs;