1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-22 00:06:56 +02:00
TableFilter/src/array.js
2015-10-18 21:55:40 +11:00

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;
}
};