1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2026-03-17 08:05:44 +01:00
TableFilter/src/array.js
2015-10-18 21:55:40 +11:00

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