MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / getDatasetRuntimeFilters

Function getDatasetRuntimeFilters

server/modules/chartRuntimeFilters.js:283–297  ·  view source on GitHub ↗
(runtimeContext, datasetOptions = {})

Source from the content-addressed store, hash-verified

281}
282
283function getDatasetRuntimeFilters(runtimeContext, datasetOptions = {}) {
284 const datasetId = `${datasetOptions.cdc_id || datasetOptions.id || ""}`;
285
286 return runtimeContext.filters.filter((filter) => {
287 if (filter.type === "date" && filter.startDate && filter.endDate) {
288 return false;
289 }
290
291 if (filter.scope === "cdc" && `${filter.cdcId || ""}` !== datasetId) {
292 return false;
293 }
294
295 return true;
296 });
297}
298
299function getDatasetDateConditions(runtimeContext, datasetOptions = {}) {
300 const dateConditions = [];

Callers 5

getDatasetDateConditionsFunction · 0.85
plotMethod · 0.85
DataExtractor.jsFile · 0.85

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected