MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / getPreciseType

Function getPreciseType

examples/simple/react.js:12755–12765  ·  view source on GitHub ↗
(propValue)

Source from the content-addressed store, hash-verified

12753// This handles more types than `getPropType`. Only used for error messages.
12754// See `createPrimitiveTypeChecker`.
12755function getPreciseType(propValue) {
12756 var propType = getPropType(propValue);
12757 if (propType === 'object') {
12758 if (propValue instanceof Date) {
12759 return 'date';
12760 } else if (propValue instanceof RegExp) {
12761 return 'regexp';
12762 }
12763 }
12764 return propType;
12765}
12766
12767// Returns class name of the object, if any.
12768function getClassName(propValue) {

Callers 1

validateFunction · 0.85

Calls 1

getPropTypeFunction · 0.85

Tested by

no test coverage detected