aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lorem.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lorem.ts b/src/lorem.ts
index 39ce9d3f..9a4f9e04 100644
--- a/src/lorem.ts
+++ b/src/lorem.ts
@@ -101,13 +101,10 @@ export class Lorem {
* // 'Et rerum a unde tempora magnam sit nisi.
* // Et perspiciatis ipsam omnis.'
*/
- sentences(sentenceCount?: number, separator?: string): string {
+ sentences(sentenceCount?: number, separator: string = ' '): string {
if (sentenceCount == null) {
sentenceCount = this.faker.datatype.number({ min: 2, max: 6 });
}
- if (separator == null) {
- separator = ' ';
- }
const sentences: string[] = [];
for (sentenceCount; sentenceCount > 0; sentenceCount--) {
sentences.push(this.faker.lorem.sentence());