UNPKG

react-a11y

Version:

Warns about potential accessibility issues with your React elements.

10 lines (7 loc) 218 B
const hasProp = (props, any) => { if (Array.isArray(any)) { return any.reduce((acc, prop) => acc || hasProp(props, prop), false); } return props && any && any in props; }; export default hasProp;