check javascript object not array and not null
function isObject (item) {
return (typeof item === "object" && !Array.isArray(item) && item !== null && item!==undefined);
}
check javascript object not array and not null
function isObject (item) {
return (typeof item === "object" && !Array.isArray(item) && item !== null && item!==undefined);
}
check javascript object not array and not null
In javascript an array is also an object,
so most of the time you want to exclude the array:
function isObjectExcludeArray(obj){
return (obj === Object(obj) && Object.prototype.toString.call(obj) !== '[object Array]');
}
check javascript object not array and not null
function isObject(val) {
if (val === null) { return false;}
return ( (typeof val === 'function') || (typeof val === 'object') );
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us