parent
037837b551
commit
0e4a111f81
1714 changed files with 20803 additions and 11751 deletions
|
|
@ -1,11 +0,0 @@
|
|||
import { substring } from 'stringz';
|
||||
|
||||
export function truncate(input: string, size: number): string;
|
||||
export function truncate(input: string | undefined, size: number): string | undefined;
|
||||
export function truncate(input: string | undefined, size: number): string | undefined {
|
||||
if (!input) {
|
||||
return input;
|
||||
} else {
|
||||
return substring(input, 0, size);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue