* 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`.
(value, object)
| 5659 | * @returns {boolean} Returns `true` if `value` is a property name, else `false`. |
| 5660 | */ |
| 5661 | function isKey(value, object) { |
| 5662 | var type = typeof value; |
| 5663 | if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { |
| 5664 | return true; |
| 5665 | } |
| 5666 | if (isArray(value)) { |
| 5667 | return false; |
| 5668 | } |
| 5669 | var result = !reIsDeepProp.test(value); |
| 5670 | return result || (object != null && value in toObject(object)); |
| 5671 | } |
| 5672 | |
| 5673 | /** |
| 5674 | * Checks if `func` has a lazy counterpart. |
no test coverage detected