varisArray=require('./isArray'),isSymbol=require('./isSymbol');/** Used to match property names within property paths. */varreIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;/** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */functionisKey(value,object){if(isArray(value)){returnfalse;}vartype=typeofvalue;if(type=='number'||type=='symbol'||type=='boolean'||value==null||isSymbol(value)){returntrue;}returnreIsPlainProp.test(value)||!reIsDeepProp.test(value)||(object!=null&&valueinObject(object));}module.exports=isKey;