File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ export class Lorem {
140
140
// TODO @Shinigami 92 2022-01-11: Is this a function-name alias?
141
141
// Or can we just remove the `loremText`?
142
142
// TODO @Shinigami 92 2022-01-11: `times` is not in use
143
- text = function loremText ( times ?: number ) {
143
+ text ( times ?: number ) : string {
144
144
const loremMethods = [
145
145
'lorem.word' ,
146
146
'lorem.words' ,
@@ -152,7 +152,16 @@ export class Lorem {
152
152
] ;
153
153
const randomLoremMethod = this . faker . random . arrayElement ( loremMethods ) ;
154
154
return this . faker . fake ( '{{' + randomLoremMethod + '}}' ) ;
155
- } ;
155
+ }
156
+
157
+ /**
158
+ * Alias for `text`.
159
+ *
160
+ * @param times
161
+ */
162
+ loremText ( times ?: number ) : string {
163
+ return this . text ( times ) ;
164
+ }
156
165
157
166
/**
158
167
* Returns lines of lorem separated by `'\n'`
You can’t perform that action at this time.
0 commit comments