Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
break;
case 'filter.commentBefore':
commentFormatter['before'] = preferences[key];
break;
case 'filter.commentTrigger':
commentFormatter['trigger'] = preferences[key];
break;
default:
break;
}
}
return {
comment: commentFormatter
};
}
let fuzzySearchMinScore = typeof preferences['css.fuzzySearchMinScore'] === 'number' ? preferences['css.fuzzySearchMinScore'] : 0.3;
if (fuzzySearchMinScore > 1) {
fuzzySearchMinScore = 1;
}
else if (fuzzySearchMinScore < 0) {
fuzzySearchMinScore = 0;
}
let stylesheetFormatter = {
'fuzzySearchMinScore': fuzzySearchMinScore
};
for (let key in preferences) {
switch (key) {
case 'css.floatUnit':
stylesheetFormatter['floatUnit'] = preferences[key];
break;
case 'css.intUnit':
stylesheetFormatter['intUnit'] = preferences[key];
break;
case 'filter.commentBefore':
commentFormatter['before'] = preferences[key];
break;
case 'filter.commentTrigger':
commentFormatter['trigger'] = preferences[key];
break;
default:
break;
}
}
return {
comment: commentFormatter
};
}
let fuzzySearchMinScore = typeof preferences['css.fuzzySearchMinScore'] === 'number' ? preferences['css.fuzzySearchMinScore'] : 0.3;
if (fuzzySearchMinScore > 1) {
fuzzySearchMinScore = 1
} else if (fuzzySearchMinScore < 0) {
fuzzySearchMinScore = 0
}
let stylesheetFormatter = {
'fuzzySearchMinScore': fuzzySearchMinScore
};
for (let key in preferences) {
switch (key) {
case 'css.floatUnit':
stylesheetFormatter['floatUnit'] = preferences[key];
break;
case 'css.intUnit':
stylesheetFormatter['intUnit'] = preferences[key];
break;