function getStaticPropertyName(node) {
	let prop;

	switch (node && node.type) {
		case "ChainExpression":
			return getStaticPropertyName(node.expression);

		case "Property":
		case "PropertyDefinition":
		case "MethodDefinition":
			prop = node.key;
			break;

		case "MemberExpression":
			prop = node.property;
			break;

		// no default
	}

	if (prop) {
		if (prop.type === "Identifier" && !node.computed) {
			return prop.name;
		}

		return getStaticStringValue(prop);
	}

	return null;
}
Gets the property name of a given node.
The node can be a MemberExpression, a Property, or a MethodDefinition.

If the name is dynamic, this returns `null`.

For examples:

    a.b           // => "b"
    a["b"]        // => "b"
    a['b']        // => "b"
    a[`b`]        // => "b"
    a[100]        // => "100"
    a[b]          // => null
    a["a" + "b"]  // => null
    a[tag`b`]     // => null
    a[`${b}`]     // => null

    let a = {b: 1}            // => "b"
    let a = {["b"]: 1}        // => "b"
    let a = {['b']: 1}        // => "b"
    let a = {[`b`]: 1}        // => "b"
    let a = {[100]: 1}        // => "100"
    let a = {[b]: 1}          // => null
    let a = {["a" + "b"]: 1}  // => null
    let a = {[tag`b`]: 1}     // => null
    let a = {[`${b}`]: 1}     // => null
@param {ASTNode} node The node to get.
@returns {string|null} The property name if static. Otherwise, null.