UNPKG
eslint-plugin-logical-properties
Version:
latest (2.1.3)
2.1.3
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
/
isValidProperty.js
5 lines
(4 loc)
•
190 B
JavaScript
View Raw
1
2
3
4
5
export
const
isValidProperty = (
property
) => (
property
.type ===
'Property'
&& ((
property
.
key
.type ===
'Identifier')
|| (
property
.
key
.type ===
'Literal'))
&&
property
.value);