Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit edd23f1

Browse files
committed
fix(core): remove angular.lowercase/uppercase
These functions have been deprecated since 1.5.0. They are internally used, but should not be exposed as it's possible that they do not work correctly with all locales (e.g. Turkish). It makes more sense that developers use special purpose functions if they need to.
1 parent d1e4f57 commit edd23f1

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

src/Angular.js

+4-20
Original file line numberDiff line numberDiff line change
@@ -126,38 +126,22 @@ var VALIDITY_STATE_PROPERTY = 'validity';
126126
var hasOwnProperty = Object.prototype.hasOwnProperty;
127127

128128
/**
129-
* @ngdoc function
130-
* @name angular.lowercase
131-
* @module ng
132-
* @kind function
133-
*
134-
* @deprecated
135-
* sinceVersion="1.5.0"
136-
* removeVersion="1.7.0"
137-
* Use [String.prototype.toLowerCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) instead.
129+
* @private
138130
*
139131
* @description Converts the specified string to lowercase.
140132
* @param {string} string String to be converted to lowercase.
141133
* @returns {string} Lowercased string.
142134
*/
143-
var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};
135+
function lowercase(string) {return isString(string) ? string.toLowerCase() : string;};
144136

145137
/**
146-
* @ngdoc function
147-
* @name angular.uppercase
148-
* @module ng
149-
* @kind function
150-
*
151-
* @deprecated
152-
* sinceVersion="1.5.0"
153-
* removeVersion="1.7.0"
154-
* Use [String.prototype.toUpperCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) instead.
138+
* @private
155139
*
156140
* @description Converts the specified string to uppercase.
157141
* @param {string} string String to be converted to uppercase.
158142
* @returns {string} Uppercased string.
159143
*/
160-
var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};
144+
function uppercase(string) {return isString(string) ? string.toUpperCase() : string;};
161145

162146

163147
var manualLowercase = function(s) {

src/AngularPublic.js

-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ function publishExternalAPI(angular) {
149149
'isArray': isArray,
150150
'version': version,
151151
'isDate': isDate,
152-
'lowercase': lowercase,
153-
'uppercase': uppercase,
154152
'callbacks': {$$counter: 0},
155153
'getTestability': getTestability,
156154
'reloadWithDebugInfo': reloadWithDebugInfo,

0 commit comments

Comments
 (0)