MCPcopy Create free account
hub / github.com/microsoft/SandDance / getOperators

Function getOperators

docs/app/js/sanddance-app.js:12913–12930  ·  view source on GitHub ↗
(ex, column)

Source from the content-addressed store, hash-verified

12911 });
12912}
12913function getOperators(ex, column) {
12914 let anySelected = false;
12915 const validOperators = getValidOperators(column);
12916 const options = validOperators.map((validoperator)=>{
12917 const [op, text] = validoperator;
12918 const selected = ex.operator === op;
12919 anySelected = anySelected || selected;
12920 const option = {
12921 key: op,
12922 text,
12923 data: op,
12924 selected
12925 };
12926 return option;
12927 });
12928 if (!anySelected) options[0].selected = true;
12929 return options;
12930}
12931function getDistinctValues(data, columnName) {
12932 const distinctMap = {};
12933 for(let i = 0; i < data.length; i++){

Callers 1

SearchTermFunction · 0.70

Calls 1

getValidOperatorsFunction · 0.70

Tested by

no test coverage detected