mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-06-29 10:50:51 +02:00
18 lines
379 B
JavaScript
18 lines
379 B
JavaScript
/**
|
|
* Array utilities
|
|
*/
|
|
|
|
import Str from './string';
|
|
|
|
export default {
|
|
has: function(arr, val, caseSensitive){
|
|
let sCase = caseSensitive===undefined ? false : caseSensitive;
|
|
for (var i=0; i<arr.length; i++){
|
|
if(Str.matchCase(arr[i].toString(), sCase) == val){
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
};
|