mirror of
https://github.com/certd/certd.git
synced 2026-04-11 19:01:00 +08:00
9 lines
186 B
TypeScript
9 lines
186 B
TypeScript
export const stringUtils = {
|
|
maxLength(str?: string, length = 100) {
|
|
if (str) {
|
|
return str.length > length ? str.slice(0, length) + '...' : str;
|
|
}
|
|
return '';
|
|
},
|
|
};
|