Поля и методы slug
Поле — это простой факт о значении, который читается через точку без скобок: $value.name. Метод принимает аргументы или выполняет действие и вызывается через ->: $value->name(arguments), или с передачей значения через конвейер: $value |> name(arguments).
Поля
| Поле | Тип | Описание |
|---|---|---|
.words | list | Слова: ['my', 'first', 'post']. |
Методы из any
->convert(from?: 'json'|yaml|'csv'|'markdown'|'latex', to?: 'json'|yaml|'csv'|html|'markdown'|'latex', header?: bool, as?: type, headers?: list, indented?: bool)->from(type: 'json'|yaml|'csv'|'markdown'|'latex', header?: bool, as?: type)->is_a(type: word)->is_null()->or(fallback)->to(type: 'json'|yaml|'csv'|html|'markdown'|'latex', headers?: list, indented?: bool)->to_string()->type()
Методы из string
->contains(text, ignore_case?: bool)->count()->ends_with(text, ignore_case?: bool)->escape()->index_of(text, ignore_case?: bool, last?: bool)->markdown_escape()->matches(pattern: regex)->pad(width: number, char?, start?: bool)->replace(old, new, ignore_case?: bool)->slice(start: number, end?: number)->split(separator?)->starts_with(text, ignore_case?: bool)->truncate(length: number, suffix?)->upper()->url_encode()