MCPcopy Create free account
hub / github.com/caseywebdev/react-list / validateProperty$1

Function validateProperty$1

docs/index.js:21403–21443  ·  view source on GitHub ↗
(tagName, name)

Source from the content-addressed store, hash-verified

21401 return aliases.get(name) || name;
21402 }
21403 function validateProperty$1(tagName, name) {
21404 if (
21405 hasOwnProperty.call(warnedProperties$1, name) &&
21406 warnedProperties$1[name]
21407 )
21408 return !0;
21409 if (rARIACamel$1.test(name)) {
21410 tagName = "aria-" + name.slice(4).toLowerCase();
21411 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
21412 if (null == tagName)
21413 return (
21414 console.error(
21415 "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
21416 name
21417 ),
21418 (warnedProperties$1[name] = !0)
21419 );
21420 if (name !== tagName)
21421 return (
21422 console.error(
21423 "Invalid ARIA attribute `%s`. Did you mean `%s`?",
21424 name,
21425 tagName
21426 ),
21427 (warnedProperties$1[name] = !0)
21428 );
21429 }
21430 if (rARIA$1.test(name)) {
21431 tagName = name.toLowerCase();
21432 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
21433 if (null == tagName) return (warnedProperties$1[name] = !0), !1;
21434 name !== tagName &&
21435 (console.error(
21436 "Unknown ARIA attribute `%s`. Did you mean `%s`?",
21437 name,
21438 tagName
21439 ),
21440 (warnedProperties$1[name] = !0));
21441 }
21442 return !0;
21443 }
21444 function validateProperties$2(type, props) {
21445 var invalidProps = [],
21446 key;

Callers 1

validateProperties$2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…