rem: compare: function (a, b) { /***  Compare two objects in a sensible manner.  Currently this is:  1. undefined and null compare equal to each other 2. undefined and null are less than anything else 3. comparators registered with registerComparator are used to find a good comparator.  Built-in comparators are currently available for arrays and dates. 4. Otherwise hope that the built-in comparison operators do something useful, which should work for numbers and strings.  Returns what one would expect from a comparison function.  returns:  0 when a == b 1 when a > b -1 when a < b  ***/ if (a == b) { return 0; } var aIsNull = (typeof(a) == 'undefined' || a == null); var bIsNull = (typeof(b) == 'undefined' || b == null); if (aIsNull && bIsNull) { return 0; } else if (aIsNull) { return -1; } else if (bIsNull) { return 1; } var m = MochiKit.Base;  var prim = m._primitives; if (!(typeof(a) in prim && typeof(b) in prim)) { try { return m.comparatorRegistry.match(a, b); } catch (e) { if (e != m.NotFound) { throw e; } } } if (a < b) { return -1; } else if (a > b) { return 1; }  var repr = m.repr; throw new TypeError(repr(a) + " and " + repr(b) + " can not be compared"); }, 
add: },_primitives:{"bool":true,"string":true,"number":true},compare:function(a,b){ if(a==b){ return 0; } var _59=(typeof (a)=="undefined"||a==null); var _60=(typeof (b)=="undefined"||b==null); if(_59&&_60){ return 0; }else{ if(_59){ return -1; }else{ if(_60){ return 1; } } } var m=MochiKit.Base; var _61=m._primitives; if(!(typeof (a) in _61&&typeof (b) in _61)){ try{ return m.comparatorRegistry.match(a,b); } catch(e){ if(e!=m.NotFound){ throw e; } } } if(a<b){ return -1; }else{ if(a>b){ return 1; } } var _62=m.repr; throw new TypeError(_62(a)+" and "+_62(b)+" can not be compared"); },compareDateLike:function(a,b){ 
context:     compare: function (a, b) {        /***            Compare two objects in a sensible manner.  Currently this is:                1. undefined and null compare equal to each other                2. undefined and null are less than anything else                3. comparators registered with registerComparator are                   used to find a good comparator.  Built-in comparators                   are currently available for arrays and dates.                4. Otherwise hope that the built-in comparison operators                   do something useful, which should work for numbers                   and strings.            Returns what one would expect from a comparison function.            returns:                 0 when a == b                 1 when a > b                -1 when a < b        ***/        if (a == b) {            return 0;        }        var aIsNull = (typeof(a) == 'undefined' || a == null);        var bIsNull = (typeof(b) == 'undefined' || b == null);        if (aIsNull && bIsNull) {            return 0;        } else if (aIsNull) {            return -1;        } else if (bIsNull) {            return 1;        }        var m = MochiKit.Base;        // bool, number, string have meaningful comparisons        var prim = m._primitives;        if (!(typeof(a) in prim && typeof(b) in prim)) {            try {                return m.comparatorRegistry.match(a, b);            } catch (e) {                if (e != m.NotFound) {                    throw e;                }            }        }        if (a < b) {            return -1;        } else if (a > b) {            return 1;        }        // These types can't be compared        var repr = m.repr;        throw new TypeError(repr(a) + " and " + repr(b) + " can not be compared");    },
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/ad067b3f5d648d6df90ec6fb2b79f0027612a307/MochiKit.js/buggy/trunk/lib/MochiKit.js