$$lte
Checks if value is less than or equal to another value
Usage​
{
"$$lte": /* A value which `value` should be less than or equal to (value <= input) */,
"value": /* any */,
"strict": false /* boolean */
}
"$$lte(<value>,[strict]):{input}"
note
Concrete values in the usage example are default values.
Returns​
boolean
Arguments​
| Argument | Type | Values | Required / Default Value | Description |
|---|---|---|---|---|
| Input | object | Yes | A value which value should be less than or equal to (value <= input) | |
value | any | Yes | Value to check against | |
strict | boolean | false/true | false | Disable input type coercion between string to numbers (if value is number) |
Examples​
Input
Definition
Output
"A"
{
"$$lte": "B",
"value": "$"
}
true
"B"
{
"$$lte": "A",
"value": "$"
}
false
4
{
"$$lte": 5,
"value": "$"
}
true
4
{
"$$lte": 4,
"value": "$"
}
true
4
{
"$$lte": 3,
"value": "$"
}
false
4
{
"$$lte": "5",
"value": "$"
}
true
4
{
"$$lte": "5",
"value": "$",
"strict": true
}
false
[
1
]
{
"$$lte": [
1,
2
],
"value": "$"
}
true
{
"a": true
}
{
"$$lte": {
"a": true,
"b": true
},
"value": "$"
}
true
"A"
"$$lte($):B"
true
4
"$$lte($):5"
true
4
"$$lte($,true):5"
false