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

teableio / teable / 8372508544

21 Mar 2024 09:19AM UTC coverage: 79.937% (+51.7%) from 28.222%
8372508544

Pull #483

github

web-flow
Merge 19c8946e2 into 745733536
Pull Request #483: fix: Date Picker timezone

3231 of 3822 branches covered (84.54%)

25153 of 31466 relevant lines covered (79.94%)

1188.39 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,749✔
5

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

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

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

4,749✔
16
  return cleanedName;
4,749✔
17
}
4,749✔
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