Packages

Generate lorem ipsum placeholder text in Gleam

Current section

Files

Jump to
lorem_ipsum README.md
Raw

README.md

# lorem_ipsum
[![Package Version](https://img.shields.io/hexpm/v/lorem_ipsum)](https://hex.pm/packages/lorem_ipsum)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/lorem_ipsum/)
```sh
gleam add lorem_ipsum@1
```
```gleam
import lorem_ipsum
pub fn main() -> Nil {
let words = lorem_ipsum.words(5)
let sentences = lorem_ipsum.sentences(2)
let paragraphs = lorem_ipsum.paragraphs(2)
io.println(words)
io.println(sentences)
io.println(paragraphs)
}
```
Further documentation can be found at <https://hexdocs.pm/lorem_ipsum>.
## API
- `lorem_ipsum.words(count: Int) -> String`
- `lorem_ipsum.sentences(count: Int) -> String`
- `lorem_ipsum.paragraphs(count: Int) -> String`
For advanced usage you can use:
- `lorem_ipsum.generate(options: lorem_ipsum.Options) -> String`
See the module docs for the `Options`, `Units`, and `Format` types.
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
```