bench/lib/benchmark.js
function hasKey() {
    // lazy define for worst case fallback (not as accurate)
    hasKey = function(object, key) {
      var parent = object != null && (object.constructor || Object).prototype;
      return !!parent && key in Object(object) && !(key in parent && object[key] === parent[key]);
    };
    // for modern browsers
    if (isClassOf(hasOwnProperty, 'Function')) {
      hasKey = function(object, key) {
        return object != null && hasOwnProperty.call(object, key);
      };
    }
    // for Safari 2
    else if ({}.__proto__ == Object.prototype) {
      hasKey = function(object, key) {
        var result = false;
        if (object != null) {
          object = Object(object);
          object.__proto__ = [object.__proto__, object.__proto__ = null, result = key in object][0];
        }
        return result;
      };
    }
    return hasKey.apply(this, arguments);
  }
function hasKey() {
    // lazy define for worst case fallback (not as accurate)
    hasKey = function(object, key) {
      var parent = object != null && (object.constructor || Object).prototype;
      return !!parent && key in Object(object) && !(key in parent && object[key] === parent[key]);
    };
    // for modern browsers
    if (isClassOf(hasOwnProperty, 'Function')) {
      hasKey = function(object, key) {
        return object != null && hasOwnProperty.call(object, key);
      };
    }
    // for Safari 2
    else if ({}.__proto__ == Object.prototype) {
      hasKey = function(object, key) {
        var result = false;
        if (object != null) {
          object = Object(object);
          object.__proto__ = [object.__proto__, object.__proto__ = null, result = key in object][0];
        }
        return result;
      };
    }
    return hasKey.apply(this, arguments);
  }
function hasKey ( ) { // lazy define for worst case fallback (not as accurate) hasKey = function ( object , key ) { var parent = object != null && ( object . constructor || Object ) . prototype ; return ! ! parent && key in Object ( object ) && ! ( key in parent && object [ key ] === parent [ key ] ) ; } ; // for modern browsers if ( isClassOf ( hasOwnProperty , 'Function' ) ) { hasKey = function ( object , key ) { return object != null && hasOwnProperty . call ( object , key ) ; } ; } // for Safari 2 else if ( { } . __proto__ == Object . prototype ) { hasKey = function ( object , key ) { var result = false ; if ( object != null ) { object = Object ( object ) ; object . __proto__ = [ object . __proto__ , object . __proto__ = null , result = key in object ] [ 0 ] ; } return result ; } ; } return hasKey . apply ( this , arguments ) ; }
Checks if an object has the specified key as a direct property.

@static
@memberOf Benchmark
@param {Object} object The object to check.
@param {String} key The key to check for.
@returns {Boolean} Returns `true` if key is a direct property, else `false`.
Checks if an object has the specified key as a direct property .