You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
function formatPreferredWordScore(input, customFormatsLength = 0) {
|
|
const score = Number(input);
|
|
|
|
if (score > 0) {
|
|
return `+${score}`;
|
|
}
|
|
|
|
if (score < 0) {
|
|
return score;
|
|
}
|
|
|
|
return customFormatsLength > 0 ? '+0' : '';
|
|
}
|
|
|
|
export default formatPreferredWordScore;
|