trimString() — react Function Reference
Architecture documentation for the trimString() function in formatting.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 9b5bb02f_1f54_393f_07e9_6f895ce3958a["trimString()"] f4cf9100_74bc_5445_ffb5_84c37b555dd3["formatting.js"] 9b5bb02f_1f54_393f_07e9_6f895ce3958a -->|defined in| f4cf9100_74bc_5445_ffb5_84c37b555dd3 40c12e4f_9127_e524_60c0_a2a49d23e2ee["TooltipReactComponentMeasure()"] 40c12e4f_9127_e524_60c0_a2a49d23e2ee -->|calls| 9b5bb02f_1f54_393f_07e9_6f895ce3958a 5ee18cfd_40a4_9d02_3d6e_66eff58cbee5["TooltipNativeEvent()"] 5ee18cfd_40a4_9d02_3d6e_66eff58cbee5 -->|calls| 9b5bb02f_1f54_393f_07e9_6f895ce3958a f8a71834_d8e2_fb38_f717_67790b96f075["TooltipSchedulingEvent()"] f8a71834_d8e2_fb38_f717_67790b96f075 -->|calls| 9b5bb02f_1f54_393f_07e9_6f895ce3958a f81f7df6_e90c_4ffc_9c02_dc47ecf37b47["TooltipSuspenseEvent()"] f81f7df6_e90c_4ffc_9c02_dc47ecf37b47 -->|calls| 9b5bb02f_1f54_393f_07e9_6f895ce3958a 101b2b32_0025_6354_07e3_6e2d0fe57734["TooltipThrownError()"] 101b2b32_0025_6354_07e3_6e2d0fe57734 -->|calls| 9b5bb02f_1f54_393f_07e9_6f895ce3958a style 9b5bb02f_1f54_393f_07e9_6f895ce3958a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-timeline/src/utils/formatting.js lines 27–32
export function trimString(string: string, length: number): string {
if (string.length > length) {
return `${string.slice(0, length - 1)}…`;
}
return string;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does trimString() do?
trimString() is a function in the react codebase, defined in packages/react-devtools-timeline/src/utils/formatting.js.
Where is trimString() defined?
trimString() is defined in packages/react-devtools-timeline/src/utils/formatting.js at line 27.
What calls trimString()?
trimString() is called by 5 function(s): TooltipNativeEvent, TooltipReactComponentMeasure, TooltipSchedulingEvent, TooltipSuspenseEvent, TooltipThrownError.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free