6 lines
161 B
JavaScript

// Is a given variable an object?
export default function isObject(obj) {
var type = typeof obj;
return type === 'function' || type === 'object' && !!obj;
}