Method compare documentation
Performs a comparison between two values based on the given operator and returns a boolean.
Example
```javascript
bbn.fn.compare('foo', 'bar', 'eq');
// false
```
Example
```javascript
bbn.fn.compare('foo', 'bar', 'neq');
// true
```
Example
```javascript
bbn.fn.compare(3, 1, '>');
// true
```
Example
```javascript
bbn.fn.compare("JavaScript", "script", 'contain');
// true
```
Performs a comparison between two values based on the given operator and returns a boolean. - It is internally used by all the filtering functions; the available operators are:
- _===_, _=_, _equal_, _eq_, _is_, which stand for __===__
- _!==_, _notequal_, _neq_, _isnot_, which stand for __!==__
- _!=_, _different_, which stand for __!=__
- _contains_, _contain_, _icontains_, _icontain_
- _starts_, _start_
- _startswith_, _startsi_, _starti_, _istarts_, _istart_
- _endswith_, _endsi_, _endi_, _iends_, _iend_
- _like_
- _gt_, _>_, which stand for __>__
- _lt_, _<_, which stand for __<__
- _gte_, _>=_, which stand for __>=__
- _lte_, _<=_, which stand for __<=__
- _isnull_, which stands for __=== null__
- _isnotnull_, which stands for __!== null__
- _isempty_, which stands for __=== ''__
- _isnotempty_, which stands for __!== ''__
The defaut operator (if none is given) is __==__ .
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions