emberjs / emberjs/ember-inflector

support dasherized multi-word names?

Open
#61 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
107
Forks
78
Avg merge
20h 58m
Merged PRs (30d)
4

Description

When using ember-cli, it seems like it would be helpful to support the same inflection patterns for dasherized and undasherized names. Instead, I find myself doing the following:

```
Ember.Inflector.inflector.uncountable('phrase-tones')
Ember.Inflector.inflector.uncountable('phraseTones')
```

Of course, if I always wanted anything ending in `tones` to be uncountable, then I could just register the last word, but sometimes it's only class names that I want to be uncountable (i.e., in the case where each record represents a plural set of things).

Does the inflector know about word boundaries as presented in camelCase? This is a little tricky because of all-caps acronyms. Perhaps it could work as follows. If one registers the `phrase-tones` case then it also registers the phraseTones case, but not viceversa.

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.