function isObject(value) {
let type = typeof value;
return value != null && (type == ‘object‘ || type == ‘function‘);}
isObject:判断数据是不是引用类型的数据 (例如: arrays, functions, objects, regexes, new Number(0),以及 new String(''))
原文:https://www.cnblogs.com/EternalZH/p/12213688.html