Skip to content

Commit

Permalink
Merge pull request #505 from Techn1x/drop-ember-string-dep
Browse files Browse the repository at this point in the history
chore: Drop hidden ember/string dependency
  • Loading branch information
mansona authored Jul 12, 2024
2 parents 420e910 + 84c1783 commit 2e09888
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 25 deletions.
6 changes: 5 additions & 1 deletion addon/lib/system/inflector.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { capitalize } from '@ember/string';
import defaultRules from './inflections';

const BLANK_REGEX = /^\s*$/;
const LAST_WORD_DASHED_REGEX = /([\w/-]+[_/\s-])([a-z\d]+$)/;
const LAST_WORD_CAMELIZED_REGEX = /([\w/\s-]+)([A-Z][a-z\d]*$)/;
const CAMELIZED_REGEX = /[A-Z][a-z\d]*$/;
const CAPITALIZE_REGEX = /(^|\/)([a-z\u00C0-\u024F])/g;

function capitalize(str) {
return str.replace(CAPITALIZE_REGEX, (match) => match.toUpperCase());
}

function loadUncountable(rules, uncountable) {
for (let i = 0, length = uncountable.length; i < length; i++) {
Expand Down
60 changes: 37 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@babel/eslint-parser": "^7.21.3",
"@babel/plugin-proposal-decorators": "^7.21.0",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^2.9.3",
"@embroider/test-setup": "^3.0.0",
"@glimmer/component": "^1.1.2",
Expand Down

0 comments on commit 2e09888

Please sign in to comment.