src/components/HighlightText.jsx
Function getFrags
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getFrags (text, searchFragments) {
const lowerCaseText = text.toLowerCase()
return searchFragments
.reduce((acc, fragText) => {
const results = []
Avoid too many return
statements within this function. Open
Open
return [...acc, frag]