joinEnglish() — react Function Reference
Architecture documentation for the joinEnglish() function in ExhaustiveDeps.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 85285807_0028_02c0_7f46_68856091c6ec["joinEnglish()"] ea02b01a_dd46_4b35_fe00_775aec496668["ExhaustiveDeps.ts"] 85285807_0028_02c0_7f46_68856091c6ec -->|defined in| ea02b01a_dd46_4b35_fe00_775aec496668 c0937ffe_5980_6959_3af6_e18a4a23114f["rule.create()"] c0937ffe_5980_6959_3af6_e18a4a23114f -->|calls| 85285807_0028_02c0_7f46_68856091c6ec style 85285807_0028_02c0_7f46_68856091c6ec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts lines 2081–2094
function joinEnglish(arr: Array<string>): string {
let s = '';
for (let i = 0; i < arr.length; i++) {
s += arr[i];
if (i === 0 && arr.length === 2) {
s += ' and ';
} else if (i === arr.length - 2 && arr.length > 2) {
s += ', and ';
} else if (i < arr.length - 1) {
s += ', ';
}
}
return s;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does joinEnglish() do?
joinEnglish() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts.
Where is joinEnglish() defined?
joinEnglish() is defined in packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts at line 2081.
What calls joinEnglish()?
joinEnglish() is called by 1 function(s): rule.create.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free