<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
let x= genDeepObject(500);
function genDeepObject(N) {
// generate: {level0:{level1:{...levelN: {end:[[[...N-times...['abc']...]]] }}}...}}}
let obj={};
let o=obj;
let arr = [];
let a=arr;
for(let i=0; i<N; i++) {
o['level'+i]={};
o=o['level'+i];
let aa=[];
a.push(aa);
a=aa;
}
a[0]='abc';
o['end']=arr;
return obj;
}
function A(x) {
return x === Object(x);
}
A(x);
function B(x) {
return _.isObject(x);
}
B(x);
function C(x) {
return x != null && (typeof x === 'object' || typeof x === 'function');
}
C(x);
function D(x) {
return new function() { return x; }() === x;
}
D(x);
function E(x) {
return function() { return this === x; }.call(x);
}
E(x);
function F(x) { /* Requires ECMAScript 5 or later */
try {
Object.create(x);
return x !== null;
} catch(err) {
return false;
}
}
F(x);
function G(x) { /* Requires ECMAScript 5 or later */
function Constructor() {}
Constructor.prototype = x;
return Object.getPrototypeOf(new Constructor()) === x;
}
G(x);
function H(x) {
return typeof x === 'object' && x !== null
}
H(x);
function I(x) {
return (typeof x === "object" && !Array.isArray(x) && x !== null);
}
I(x);
function J(x) {
return x instanceof Object;
}
J(x);
function K(x)
{
let t= JSON.stringify(x);
return t ? t[0] === '{' : false;
}
K(x);
function L(x) {
return Object.prototype.toString.call(x) === "[object Object]";
}
L(x);
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);
function N(x) {
return $.type(x) === 'object';
}
N(x);
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);
function P(x) {
while ( Object.prototype.toString.call(x) === '[object Object]')
if ((x = Object.getPrototypeOf(x)) === null)
return true
return false
}
P(x);
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);
function R(x) {
return typeof x == 'object' && x instanceof Object && !(x instanceof Array);
}
R(x);
function S(x)
{
return x != null && x.constructor?.name === "Object"
}
S(x);
function T(x) {
return x?.constructor?.toString().indexOf("Object") > -1;
}
T(x);
function U(x)
{
return x?.constructor === Object;
}
U(x);
function V(x) {
return x instanceof Object && x.constructor === Object;
}
V(x);