* Generates a random text based on a random lorem method. * * @example * faker.lorem.text() // 'Doloribus autem non quis vero quia.' * faker.lorem.text() * // 'Rerum eum reiciendis id ipsa hic dolore aut laborum provident. * // Quis beatae quis corporis veritatis corrupti ratione d
()
| 320 | * @since 3.1.0 |
| 321 | */ |
| 322 | text(): string { |
| 323 | const methods: Array<keyof LoremModule> = [ |
| 324 | 'sentence', |
| 325 | 'sentences', |
| 326 | 'paragraph', |
| 327 | 'paragraphs', |
| 328 | 'lines', |
| 329 | ]; |
| 330 | |
| 331 | const method = this.faker.helpers.arrayElement(methods); |
| 332 | |
| 333 | return this[method](); |
| 334 | } |
| 335 | |
| 336 | /** |
| 337 | * Generates the given number lines of lorem separated by `'\n'`. |
no test coverage detected