UNPKG
eslint-plugin-logical-properties
Version:
latest (2.1.2)
2.1.2
2.1.1
2.1.0
2.0.2
2.0.1
2.0.0
1.0.1
1.0.0
sabinmarcu.dev/api/eslint-plugin-logical-properties
sabinmarcu/omnirepo
eslint-plugin-logical-properties
/
dist
/
utils
/
getValidPropertyName.js
4 lines
(3 loc)
•
191 B
JavaScript
View Raw
1
2
3
4
export
const
getValidPropertyName = (
property
) => ((
property
.
key
.type ===
'Identifier' && property.key.name)
|| (
property
.
key
.type ===
'Literal' && property.key.value)
|| undefined);