Merged PR 170: Add new eslint rules
- naming-convention - prefer-arrow-callback - func-style - import/no-default-export
This commit is contained in:
parent
3f58c5ba5e
commit
ad126c6c28
65 changed files with 781 additions and 784 deletions
|
@ -1,10 +1,10 @@
|
|||
export function truncateString(str: string, num: number): string {
|
||||
export function TruncateString(str: string, num: number): string {
|
||||
if (str.length <= num) {
|
||||
return str;
|
||||
}
|
||||
return `${str.slice(0, num)}...`;
|
||||
}
|
||||
|
||||
export function camelize(str: string): any {
|
||||
export function Camelize(str: string): any {
|
||||
return str.split('-').map((word, index) => index > 0 ? word.charAt(0).toUpperCase() + word.slice(1) : word).join('');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue