lib/rules/key-spacing.js
function getKey(property) {
            const key = property.key;

            if (property.computed) {
                return sourceCode.getText().slice(key.range[0], key.range[1]);
            }

            return property.key.name || property.key.value;
        }
function getKey(property) {
            const key = property.key;

            if (property.computed) {
                return sourceCode.getText().slice(key.range[0], key.range[1]);
            }

            return property.key.name || property.key.value;
        }
function getKey ( property ) { const key = property . key ; if ( property . computed ) { return sourceCode . getText ( ) . slice ( key . range [ 0 ] , key . range [ 1 ] ) ; } return property . key . name || property . key . value ; }
Gets an object literal property's key as the identifier name or string value.
@param {ASTNode} property Property node whose key to retrieve.
@returns {string} The property's key.
Gets an object literal property s key as the identifier name or string value .