Skip to content

Commit

Permalink
N more s
Browse files Browse the repository at this point in the history
  • Loading branch information
esbanarango committed Nov 21, 2024
1 parent 034bd2f commit 1eedb10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 5 additions & 1 deletion addon/decorators/core-validator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { get, set } from '@ember/object';
import { getOwner } from '@ember/application';
import { capitalize } from '@ember/string';
import { isEmpty, isBlank, isPresent, typeOf, isEqual } from '@ember/utils';
import { A, isArray } from '@ember/array';

Expand Down Expand Up @@ -28,6 +27,11 @@ const Messages = {
'sr-cyrl': MessagesSrCyrl,
};

function capitalize(str) {
if (typeof str !== 'string' || !str.length) return '';
return str.charAt(0).toUpperCase() + str.slice(1);
}

function coreValidator(constructor) {
return class CoreValidator extends constructor {
validationErrors = {};
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^2.8.1",
"@embroider/test-setup": "^3.0.1",
"@glimmer/component": "^1.1.2",
Expand Down
7 changes: 0 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2042,13 +2042,6 @@
mkdirp "^1.0.4"
silent-error "^1.1.1"

"@ember/string@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@ember/string/-/string-3.1.1.tgz#0a5ac0d1e4925259e41d5c8d55ef616117d47ff0"
integrity sha512-UbXJ+k3QOrYN4SRPHgXCqYIJ+yWWUg1+vr0H4DhdQPTy8LJfyqwZ2tc5uqpSSnEXE+/1KopHBE5J8GDagAg5cg==
dependencies:
ember-cli-babel "^7.26.6"

"@ember/test-helpers@*", "@ember/test-helpers@^2.8.1":
version "2.9.3"
resolved "https://registry.yarnpkg.com/@ember/test-helpers/-/test-helpers-2.9.3.tgz#c2a9d6ab1c367af92cf1a334f97eb19b8e06e6e1"
Expand Down

0 comments on commit 1eedb10

Please sign in to comment.