• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 8421671885

25 Mar 2024 02:23PM UTC coverage: 79.959% (+53.9%) from 26.087%
8421671885

Pull #496

github

web-flow
Merge f587f00fb into 9313e45fb
Pull Request #496: fix: unexpected link convert

3265 of 3865 branches covered (84.48%)

63 of 63 new or added lines in 4 files covered. (100.0%)

762 existing lines in 27 files now uncovered.

25183 of 31495 relevant lines covered (79.96%)

1188.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.47
/apps/nestjs-backend/src/utils/name-conversion.ts
1
import { slugify } from 'transliteration';
2✔
2

2✔
3
export function convertNameToValidCharacter(name: string, maxLength = 10): string {
2✔
4
  let cleanedName = slugify(name, { allowedChars: 'a-zA-Z0-9_', separator: '_', lowercase: false });
4,777✔
5

4,777✔
6
  if (cleanedName === '' || /^_+$/.test(cleanedName)) {
4,777!
UNCOV
7
    return 'unnamed';
×
UNCOV
8
  }
×
9

4,777✔
10
  if (!/^[a-z]/i.test(cleanedName)) {
4,777!
UNCOV
11
    cleanedName = 't' + cleanedName;
×
UNCOV
12
  }
×
13

4,777✔
14
  cleanedName = cleanedName.substring(0, maxLength);
4,777✔
15

4,777✔
16
  return cleanedName;
4,777✔
17
}
4,777✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc