MCPcopy Create free account
hub / github.com/Lobos/react-ui / getPreciseType

Function getPreciseType

docs/lib/react.js:12842–12852  ·  view source on GitHub ↗
(propValue)

Source from the content-addressed store, hash-verified

12840// This handles more types than `getPropType`. Only used for error messages.
12841// See `createPrimitiveTypeChecker`.
12842function getPreciseType(propValue) {
12843 var propType = getPropType(propValue);
12844 if (propType === 'object') {
12845 if (propValue instanceof Date) {
12846 return 'date';
12847 } else if (propValue instanceof RegExp) {
12848 return 'regexp';
12849 }
12850 }
12851 return propType;
12852}
12853
12854// Returns class name of the object, if any.
12855function getClassName(propValue) {

Callers 1

validateFunction · 0.85

Calls 1

getPropTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…