lib/rules/object-shorthand.js
function isConstructor(name) {
            const match = CTOR_PREFIX_REGEX.exec(name);

            // Not a constructor if name has no characters apart from '_', '$' and digits e.g. '_', '$$', '_8'
            if (!match) {
                return false;
            }

            const firstChar = name.charAt(match.index);

            return firstChar === firstChar.toUpperCase();
        }
function isConstructor(name) {
            const match = CTOR_PREFIX_REGEX.exec(name);

            // Not a constructor if name has no characters apart from '_', '$' and digits e.g. '_', '$$', '_8'
            if (!match) {
                return false;
            }

            const firstChar = name.charAt(match.index);

            return firstChar === firstChar.toUpperCase();
        }
function isConstructor ( name ) { const match = CTOR_PREFIX_REGEX . exec ( name ) ; // Not a constructor if name has no characters apart from '_', '$' and digits e.g. '_', '$$', '_8' if ( ! match ) { return false ; } const firstChar = name . charAt ( match . index ) ; return firstChar === firstChar . toUpperCase ( ) ; }
Determines if the first character of the name is a capital letter.
@param {string} name The name of the node to evaluate.
@returns {boolean} True if the first character of the property name is a capital letter, false if not.
@private
Determines if the first character of the name is a capital letter .