UNPKG

ottoman

Version:
14 lines 517 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildMapViewIndexFn = void 0; const buildMapViewIndexFn = (metadata, fields) => { const { modelKey, modelName } = metadata; const docFields = fields.map((field) => `doc.${field}`); return `function (doc, meta) { if (doc.${modelKey} == "${modelName}") { emit([${docFields.join(',')}], null); } }`; }; exports.buildMapViewIndexFn = buildMapViewIndexFn; //# sourceMappingURL=build-map-view-index-fn.js.map