v1
- by lamik 9/24/202000
disable setup HTML
Setup HTML
<script
  src="https://code.jquery.com/jquery-3.5.1.min.js"
  integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
  crossorigin="anonymous"></script>
disable setup JavaScript
Setup JavaScript
let x= 123;
delete caserun single casemove downdrag and drop case


ready



function A(x) {
  return x === Object(x);
}

A(x);
delete caserun single casemove upmove downdrag and drop case


ready



function B(x) {
    return _.isObject(x);
}

B(x);
delete caserun single casemove upmove downdrag and drop case


ready



function C(x) {
    return x != null && (typeof x === 'object' || typeof x === 'function');
}

C(x);
delete caserun single casemove upmove downdrag and drop case


ready



function D(x) { 
  return new function() { return x; }() === x;
}

D(x);
delete caserun single casemove upmove downdrag and drop case


ready



function E(x) { 
  return function() { return this === x; }.call(x);
}

E(x);
delete caserun single casemove upmove downdrag and drop case


ready



function F(x) { /* Requires ECMAScript 5 or later */
  try {
    Object.create(x);
    return x !== null;
  } catch(err) {
    return false;
  }
}

F(x);
delete caserun single casemove upmove downdrag and drop case


ready



function G(x) { /* Requires ECMAScript 5 or later */
  function Constructor() {}
  Constructor.prototype = x;
  return Object.getPrototypeOf(new Constructor()) === x;
}

G(x);
delete caserun single casemove upmove downdrag and drop case


ready



function H(x) {
  return typeof x === 'object' && x !== null
}

H(x);
delete caserun single casemove upmove downdrag and drop case


ready



function I(x) {
  return (typeof x === "object" && !Array.isArray(x) && x !== null);
}

I(x);
delete caserun single casemove upmove downdrag and drop case


ready



function J(x) {
  return x instanceof Object; 
}

J(x);
delete caserun single casemove upmove downdrag and drop case


ready



function K(x)
{
    let t= JSON.stringify(x);
    return t ? t[0] === '{' : false;
}

K(x);
delete caserun single casemove upmove downdrag and drop case


ready



function L(x) {
  return Object.prototype.toString.call(x) === "[object Object]";
}

L(x);

delete caserun single casemove upmove downdrag and drop case


ready



function M(o, strict = true) {
  if (o === null || o === undefined) {
    return false;
  }
  const instanceOfObject = o instanceof Object;
  const typeOfObject = typeof o === 'object';
  const constructorUndefined = o.constructor === undefined;
  const constructorObject = o.constructor === Object;
  const typeOfConstructorObject = typeof o.constructor === 'function';
  let r;
  if (strict === true) {
    r = (instanceOfObject || typeOfObject) && (constructorUndefined || constructorObject);
  } else {
    r = (constructorUndefined || typeOfConstructorObject);
  }
  return r;
}

M(x);
delete caserun single casemove upmove downdrag and drop case


ready



function N(x) {
    return $.type(x) === 'object';
}

N(x);
delete caserun single casemove upmove downdrag and drop case


ready



function O(x) {
    if (Object.prototype.toString.call(x) !== '[object Object]') {
        return false;
    } else {
        var prototype = Object.getPrototypeOf(x);
        return prototype === null || prototype === Object.prototype;
    }
}

O(x);
delete caserun single casemove upmove downdrag and drop case


ready



function P(x) {
  while (     Object.prototype.toString.call(x) === '[object Object]')
  if    ((x = Object.getPrototypeOf(x))         === null)
  return true
  return false
}

P(x);
delete caserun single casemove upmove downdrag and drop case


ready



function Q(x){
  try{
    switch(x.constructor){
      case Number:
      case Function:
      case Boolean:
      case Symbol:
      case Date:
      case String:
      case RegExp:
        return x.constructor === Object;
      case Error:
      case EvalError:
      case RangeError:
      case ReferenceError:
      case SyntaxError:
      case TypeError:
      case URIError:
        return (Object === Error ? Error : x.constructor) === Object;
      case Array:
      case Int8Array:
      case Uint8Array:
      case Uint8ClampedArray:
      case Int16Array:
      case Uint16Array:
      case Int32Array:
      case Uint32Array:
      case Float32Array:
      case Float64Array:
        return (Object === Array ? Array : x.constructor) === Object;
      case Object:
      default:
        return (Object === Object ? Object : x.constructor) === Object;
    }
  } catch(ex){
    return x == Object;   
  }
}

Q(x);
delete caserun single casemove upmove downdrag and drop case


ready



function R(x) {
    return typeof x == 'object' && x instanceof Object && !(x instanceof Array);
}

R(x);
delete caserun single casemove upmove downdrag and drop case


ready



function S(x)
{
    return x != null && x.constructor?.name === "Object"
}

S(x);
delete caserun single casemove upmove downdrag and drop case


ready



function T(x) {
    return x?.constructor?.toString().indexOf("Object") > -1;
}

T(x);
delete caserun single casemove upmove downdrag and drop case


ready



function U(x)
{
    return x?.constructor === Object;
}

U(x);
delete caserun single casemove updrag and drop case


ready



function V(x) {
  return x instanceof Object && x.constructor === Object;
}

V(x);
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN