IfThen.ifBetween()

Check that a value is within the specified range (inclusive).

Usage

Hover over inputs/exits for more info.

var IfThen = require('machinepack-ifthen');


// Check that a value is within the specified range (inclusive).

IfThen.ifBetween({

value: 3,

min: 1,

max: 4,

}).execSync();

Inputs

value required

The number to check.

3
min required

The minimum acceptable number

1
max required

The maximum acceptable number

4

Exits

error

An unexpected error occurred.

otherwise

The value is NOT within the specified range.

success

OK.