Skip to content

Commit 7ce94d5

Browse files
authored
Merge pull request esbanarango#354 from esbanarango/esbanarango/no-s
N more s
2 parents 034bd2f + 1eedb10 commit 7ce94d5

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

addon/decorators/core-validator.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { get, set } from '@ember/object';
22
import { getOwner } from '@ember/application';
3-
import { capitalize } from '@ember/string';
43
import { isEmpty, isBlank, isPresent, typeOf, isEqual } from '@ember/utils';
54
import { A, isArray } from '@ember/array';
65

@@ -28,6 +27,11 @@ const Messages = {
2827
'sr-cyrl': MessagesSrCyrl,
2928
};
3029

30+
function capitalize(str) {
31+
if (typeof str !== 'string' || !str.length) return '';
32+
return str.charAt(0).toUpperCase() + str.slice(1);
33+
}
34+
3135
function coreValidator(constructor) {
3236
return class CoreValidator extends constructor {
3337
validationErrors = {};

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
},
4141
"devDependencies": {
4242
"@ember/optional-features": "^2.0.0",
43-
"@ember/string": "^3.1.1",
4443
"@ember/test-helpers": "^2.8.1",
4544
"@embroider/test-setup": "^3.0.1",
4645
"@glimmer/component": "^1.1.2",

yarn.lock

-7
Original file line numberDiff line numberDiff line change
@@ -2042,13 +2042,6 @@
20422042
mkdirp "^1.0.4"
20432043
silent-error "^1.1.1"
20442044

2045-
"@ember/string@^3.1.1":
2046-
version "3.1.1"
2047-
resolved "https://registry.yarnpkg.com/@ember/string/-/string-3.1.1.tgz#0a5ac0d1e4925259e41d5c8d55ef616117d47ff0"
2048-
integrity sha512-UbXJ+k3QOrYN4SRPHgXCqYIJ+yWWUg1+vr0H4DhdQPTy8LJfyqwZ2tc5uqpSSnEXE+/1KopHBE5J8GDagAg5cg==
2049-
dependencies:
2050-
ember-cli-babel "^7.26.6"
2051-
20522045
"@ember/test-helpers@*", "@ember/test-helpers@^2.8.1":
20532046
version "2.9.3"
20542047
resolved "https://registry.yarnpkg.com/@ember/test-helpers/-/test-helpers-2.9.3.tgz#c2a9d6ab1c367af92cf1a334f97eb19b8e06e6e1"

0 commit comments

Comments
 (0)