From 870334be3f58507c05bfc72f3edbe5db10af4caf Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 20:06:16 +0400 Subject: remove dojo uncompressed files --- lib/dojo/data/util/filter.js.uncompressed.js | 77 ---------------------------- 1 file changed, 77 deletions(-) delete mode 100644 lib/dojo/data/util/filter.js.uncompressed.js (limited to 'lib/dojo/data/util/filter.js.uncompressed.js') diff --git a/lib/dojo/data/util/filter.js.uncompressed.js b/lib/dojo/data/util/filter.js.uncompressed.js deleted file mode 100644 index ec3e99ff1..000000000 --- a/lib/dojo/data/util/filter.js.uncompressed.js +++ /dev/null @@ -1,77 +0,0 @@ -define("dojo/data/util/filter", ["../../_base/lang"], function(lang){ - // module: - // dojo/data/util/filter - // summary: - // TODOC - -var filter = {}; -lang.setObject("dojo.data.util.filter", filter); - -filter.patternToRegExp = function(/*String*/pattern, /*boolean?*/ ignoreCase){ - // summary: - // Helper function to convert a simple pattern to a regular expression for matching. - // description: - // Returns a regular expression object that conforms to the defined conversion rules. - // For example: - // - // - ca* -> /^ca.*$/ - // - *ca* -> /^.*ca.*$/ - // - *c\*a* -> /^.*c\*a.*$/ - // - *c\*a?* -> /^.*c\*a..*$/ - // - // and so on. - // pattern: string - // A simple matching pattern to convert that follows basic rules: - // - // - * Means match anything, so ca* means match anything starting with ca - // - ? Means match single character. So, b?b will match to bob and bab, and so on. - // - \ is an escape character. So for example, \* means do not treat * as a match, but literal character *. - // - // To use a \ as a character in the string, it must be escaped. So in the pattern it should be - // represented by \\ to be treated as an ordinary \ character instead of an escape. - // ignoreCase: - // An optional flag to indicate if the pattern matching should be treated as case-sensitive or not when comparing - // By default, it is assumed case sensitive. - - var rxp = "^"; - var c = null; - for(var i = 0; i < pattern.length; i++){ - c = pattern.charAt(i); - switch(c){ - case '\\': - rxp += c; - i++; - rxp += pattern.charAt(i); - break; - case '*': - rxp += ".*"; break; - case '?': - rxp += "."; break; - case '$': - case '^': - case '/': - case '+': - case '.': - case '|': - case '(': - case ')': - case '{': - case '}': - case '[': - case ']': - rxp += "\\"; //fallthrough - default: - rxp += c; - } - } - rxp += "$"; - if(ignoreCase){ - return new RegExp(rxp,"mi"); //RegExp - }else{ - return new RegExp(rxp,"m"); //RegExp - } - -}; - -return filter; -}); -- cgit v1.2.3