lib/libs.js
function keyOfMin (o, func) {
                    if(!o || typeof o !== 'object') return o;
                    if(libs.object.size(o) === 0) return;

                    if(!(func instanceof Function)) func = undefined;

                    if(typeof o !== 'object') return o;
                    var min, minValue, minKey;

                    if(!func) {
                        min    = libs.object.first(o);
                        minKey = libs.object.keys(o)[0];
                        libs.object.each(o, 1, function (item, key) {
                            if(item <= min) {
                                min    = item;
                                minKey = key;
                            }
                        });
                    }
                    else {
                        min      = libs.object.first(o);
                        minValue = func.call(min, min);
                        minKey   = libs.object.keys(o)[0];

                        libs.object.each(o, 1, function (item, key) {
                            var value = func.call(item, item);
                            if(value <= minValue) {
                                min      = item;
                                minValue = value;
                                minKey   = key;
                            }
                        });
                    }
                    return minKey;
                }
function keyOfMin (o, func) {
                    if(!o || typeof o !== 'object') return o;
                    if(libs.object.size(o) === 0) return;

                    if(!(func instanceof Function)) func = undefined;

                    if(typeof o !== 'object') return o;
                    var min, minValue, minKey;

                    if(!func) {
                        min    = libs.object.first(o);
                        minKey = libs.object.keys(o)[0];
                        libs.object.each(o, 1, function (item, key) {
                            if(item <= min) {
                                min    = item;
                                minKey = key;
                            }
                        });
                    }
                    else {
                        min      = libs.object.first(o);
                        minValue = func.call(min, min);
                        minKey   = libs.object.keys(o)[0];

                        libs.object.each(o, 1, function (item, key) {
                            var value = func.call(item, item);
                            if(value <= minValue) {
                                min      = item;
                                minValue = value;
                                minKey   = key;
                            }
                        });
                    }
                    return minKey;
                }
Returns the key of the item with the lowest value in the object.
@param {Object} o The object to operate on.
@param {Function=} func If passed, the function will be invoked for each item in the object collection.
@return {*} The minimum item in the object collection.