(mixedVar)
| 1038 | } |
| 1039 | |
| 1040 | function isEmpty(mixedVar) |
| 1041 | { |
| 1042 | var undef, key, i, len, emptyValues = [undef, null, false, 0, '', '0']; |
| 1043 | |
| 1044 | for(var i = 0, len = emptyValues.length; i < len; i++) |
| 1045 | { |
| 1046 | if(mixedVar === emptyValues[i]) |
| 1047 | { |
| 1048 | return true |
| 1049 | } |
| 1050 | } |
| 1051 | |
| 1052 | if(typeof mixedVar === 'undefined') |
| 1053 | { |
| 1054 | return true |
| 1055 | } |
| 1056 | |
| 1057 | if(typeof mixedVar === 'object') |
| 1058 | { |
| 1059 | for(key in mixedVar) |
| 1060 | { |
| 1061 | if (mixedVar.hasOwnProperty(key)) |
| 1062 | { |
| 1063 | return false |
| 1064 | } |
| 1065 | } |
| 1066 | |
| 1067 | return true |
| 1068 | } |
| 1069 | } |
| 1070 | |
| 1071 | function matchArray(string, array) |
| 1072 | { |
no outgoing calls
no test coverage detected