Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
calcFunding (from, to) {
if (from > 0 && to > 0) {
if (from === to) {
return formatMoney(from)
} else {
return `${formatMoney(from)} - ${formatMoney(to)}`
}
} else if (from === 0 && to > 0) {
return `$0 - ${formatMoney(to)}`
} else if (from > 0 && to === 0) {
return formatMoney(from)
} else {
return null
}
},
calcStatus (startDate, endDate, terms = this.statusTerms) {
calcFunding (from, to) {
if (from > 0 && to > 0) {
if (from === to) {
return formatMoney(from)
} else {
return `${formatMoney(from)} - ${formatMoney(to)}`
}
} else if (from === 0 && to > 0) {
return `$0 - ${formatMoney(to)}`
} else if (from > 0 && to === 0) {
return formatMoney(from)
} else {
return null
}
},
calcStatus (startDate, endDate, terms = this.statusTerms) {
const calcFunding = (funding) => {
if (funding.from > 0 && funding.to > 0) {
if (funding.from === funding.to) {
return formatMoney(funding.from)
} else {
return `${formatMoney(funding.from)} - ${formatMoney(funding.to)}`
}
} else if (funding.from === 0 && funding.to > 0) {
return `$0 - ${formatMoney(funding.to)}`
} else if (funding.from > 0 && funding.to === 0) {
return formatMoney(funding.from)
} else {
return null
}
}
const fundingLevel = calcFunding(this.funding)
const calcFunding = (funding) => {
if (funding.from > 0 && funding.to > 0) {
if (funding.from === funding.to) {
return formatMoney(funding.from)
} else {
return `${formatMoney(funding.from)} - ${formatMoney(funding.to)}`
}
} else if (funding.from === 0 && funding.to > 0) {
return `$0 - ${formatMoney(funding.to)}`
} else if (funding.from > 0 && funding.to === 0) {
return formatMoney(funding.from)
} else {
return null
}
}
const fundingLevel = calcFunding(this.funding)
calcFunding (from, to) {
if (from > 0 && to > 0) {
if (from === to) {
return formatMoney(from)
} else {
return `${formatMoney(from)} - ${formatMoney(to)}`
}
} else if (from === 0 && to > 0) {
return `$0 - ${formatMoney(to)}`
} else if (from > 0 && to === 0) {
return formatMoney(from)
} else {
return null
}
},
calcStatus (startDate, endDate, terms = this.statusTerms) {