parent
4c789f980d
commit
89b516f12f
1 changed files with 9 additions and 0 deletions
@ -0,0 +1,9 @@ |
||||
export const repeat = ( |
||||
value: string, |
||||
count: number, |
||||
{ prefix = '' }: { prefix?: string } = {}, |
||||
): string => { |
||||
const repeated = value.repeat(count); |
||||
|
||||
return repeated ? `${prefix}${repeated}` : ''; |
||||
}; |
Loading…
Reference in new issue