mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import isSymbol from '../isSymbol.js';
|
||||
import isSymbol from '../isSymbol.js'
|
||||
|
||||
/** Used to match property names within property paths. */
|
||||
const reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
||||
const reIsPlainProp = /^\w*$/;
|
||||
const reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/
|
||||
const reIsPlainProp = /^\w*$/
|
||||
|
||||
/**
|
||||
* Checks if `value` is a property name and not a property path.
|
||||
@@ -14,15 +14,15 @@ const reIsPlainProp = /^\w*$/;
|
||||
*/
|
||||
function isKey(value, object) {
|
||||
if (Array.isArray(value)) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
const type = typeof value;
|
||||
const type = typeof value
|
||||
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
||||
value == null || isSymbol(value)) {
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||||
(object != null && value in Object(object));
|
||||
(object != null && value in Object(object))
|
||||
}
|
||||
|
||||
export default isKey;
|
||||
export default isKey
|
||||
|
||||
Reference in New Issue
Block a user