6 lines
161 B
JavaScript
Raw Permalink Normal View History

2024-10-15 23:05:53 +03:00
// Is a given variable an object?
export default function isObject(obj) {
var type = typeof obj;
return type === 'function' || type === 'object' && !!obj;
}