@codemask-labs/nestjs-elasticsearch
Version:
Schema based Elasticsearch, NestJS module with utilities, type-safe queries and aggregations builders.
8 lines • 409 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTransformedTotal = void 0;
const ramda_1 = require("ramda");
const utils_1 = require("../utils");
const getTransformedTotal = ({ total }) => (0, ramda_1.is)(Number, total) ? total : (0, utils_1.isTotalHits)(total) ? total.value : 0;
exports.getTransformedTotal = getTransformedTotal;
//# sourceMappingURL=get-total.js.map
;