MGET_WITHLABELS.js 713 B

12345678910111213141516171819
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = void 0;
  4. const _1 = require(".");
  5. exports.IS_READ_ONLY = true;
  6. function transformArguments(filter, options) {
  7. const args = (0, _1.pushWithLabelsArgument)(['TS.MGET'], options?.SELECTED_LABELS);
  8. return (0, _1.pushFilterArgument)(args, filter);
  9. }
  10. exports.transformArguments = transformArguments;
  11. ;
  12. function transformReply(reply) {
  13. return reply.map(([key, labels, sample]) => ({
  14. key,
  15. labels: (0, _1.transformLablesReply)(labels),
  16. sample: (0, _1.transformSampleReply)(sample)
  17. }));
  18. }
  19. exports.transformReply = transformReply;