Is Object Ordinary
JavaScript
const isObjectOrdinary = value =>{
const prototype = Object.getPrototypeOf(value);
return prototype.isPrototypeOf(value) && Object.isExtensible(value);
}
console.log(isObjectOrdinary({}))
const isObjectOrdinary = value =>{
const prototype = Object.getPrototypeOf(value);
return prototype.isPrototypeOf(value) && Object.isExtensible(value);
}
console.log(isObjectOrdinary({}))