Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var fixLowerUpperArgs = function (args, round) {
var lowerNum = ktypes.toNumberOrNull(args.lower)
if (round && lowerNum !== null) {
lowerNum = _.round(lowerNum)
}
var upperNum = ktypes.toNumberOrNull(args.upper)
if (round && upperNum !== null) {
upperNum = _.round(upperNum)
}
var upper
if (upperNum === null) {
upper = lowerNum === null ? 1 : 0
} else {
upper = upperNum
}
return {
lower: lowerNum === null ? 0 : lowerNum,
upper: upper
}
var fixLowerUpperArgs = function (args, round) {
var lowerNum = ktypes.toNumberOrNull(args.lower)
if (round && lowerNum !== null) {
lowerNum = _.round(lowerNum)
}
var upperNum = ktypes.toNumberOrNull(args.upper)
if (round && upperNum !== null) {
upperNum = _.round(upperNum)
}
var upper
if (upperNum === null) {
upper = lowerNum === null ? 1 : 0
} else {
upper = upperNum
}