MCPcopy
hub / github.com/facebook/react / willCoercionThrow

Function willCoercionThrow

packages/shared/CheckStringCoercion.js:35–44  ·  view source on GitHub ↗
(value: mixed)

Source from the content-addressed store, hash-verified

33
34// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
35function willCoercionThrow(value: mixed): boolean {
36 if (__DEV__) {
37 try {
38 testStringCoercion(value);
39 return false;
40 } catch (e) {
41 return true;
42 }
43 }
44}
45
46/** @noinline */
47function testStringCoercion(value: mixed) {

Calls 1

testStringCoercionFunction · 0.85

Tested by

no test coverage detected