Returns a repeated string given a multiplier.
Install
Install all functions of strman
yarn add strman
or just the repeat function
yarn add strman.repeat
Usage
import { repeat } from 'strman'
// OR
import repeat from 'strman.repeat'
Parameters:
Name | Type | Description |
---|---|---|
value |
String | The String! |
multiplier |
Number | Number of repeats. |
Returns:
The String repeated!
- Type
- String
Example
const title = 'strman'
repeat(title, 5)
// => 'strmanstrmanstrmanstrmanstrman'