MCPcopy Create free account
hub / github.com/codecombat/codecombat / getPrepaidCodeAmount

Function getPrepaidCodeAmount

app/core/utils.js:918–925  ·  view source on GitHub ↗
(price, users, months)

Source from the content-addressed store, hash-verified

916}
917
918const getPrepaidCodeAmount = function (price, users, months) {
919 if (price == null) { price = 0 }
920 if (users == null) { users = 0 }
921 if (months == null) { months = 0 }
922 if (!(users > 0) || !(months > 0)) { return 0 }
923 const total = price * users * months
924 return total
925}
926
927const formatDollarValue = dollars => '$' + (parseFloat(dollars).toFixed(2))
928

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected