Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -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