adopted-ember-addons / adopted-ember-addons/ember-cli-string-helpers

Feature Request: Remove Trailing space on truncation

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
74
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Hello -

I've come across a needed feature (at least for me) is that when truncating text that falls on a space, I'd like to able to pass in a flag that strips the trailing space before appending the ellipsis,

```hbs
{{truncate "my string here" 3 true true}}
```

or via options object

```hbs
{{truncate "my string here" 3 true trim=true}}
```
I'd be happy to implement it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.