/*jslint node:true,nomen:false */ (function(exports){ var matchObj, matchArray, singleMatch; singleMatch = function(field,s) { var oneMatch = false, t, re, i, j; // for numbers, exact match; for strings, ignore-case match; for anything else, no match t = typeof(field); if (field === null) { oneMatch = s === null; } else if (field === undefined) { oneMatch = false; } else if (t === "number") { oneMatch = field === s; } else if (t === "string") { re = new RegExp(s,"i"); oneMatch = field && field.match(re) !== null; } else if (typeof(field.length) !== "undefined") { // array, so go through each for (j=0;j 0) { for (i=0;i