MCPcopy Create free account
hub / github.com/plotly/dash / getPreciseType

Function getPreciseType

dash/deps/prop-types@15.8.1.js:738–751  ·  view source on GitHub ↗
(propValue)

Source from the content-addressed store, hash-verified

736 // This handles more types than `getPropType`. Only used for error messages.
737 // See `createPrimitiveTypeChecker`.
738 function getPreciseType(propValue) {
739 if (typeof propValue === 'undefined' || propValue === null) {
740 return '' + propValue;
741 }
742 var propType = getPropType(propValue);
743 if (propType === 'object') {
744 if (propValue instanceof Date) {
745 return 'date';
746 } else if (propValue instanceof RegExp) {
747 return 'regexp';
748 }
749 }
750 return propType;
751 }
752
753 // Returns a string that is postfixed to a warning about an invalid type.
754 // For example, "undefined" or "of type array"

Callers 2

validateFunction · 0.85
getPostfixForTypeWarningFunction · 0.85

Calls 1

getPropTypeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…