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

Commit 4059600

Browse files
wesleychoNarretz
authored andcommitted
docs(*): add deprecation notice for angular.lowercase/uppercase
Closes #15441 Closes #14316
1 parent c625b0d commit 4059600

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,8 @@ This version of AngularJS is problematic due to a issue during its release. Plea
20282028

20292029
- The `ngTouch` module's `ngClick` directive has been deprecated and disabled by default. See the breaking
20302030
changes section for more information
2031+
- The `angular.lowercase` and `angular.uppercase` functions have been deprecated and will be removed
2032+
in version 1.7.0. It is recommended to use [String.prototype.toLowerCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) and [String.prototype.toUpperCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) functions instead.
20312033

20322034
## Bug Fixes
20332035

docs/content/guide/migration.ngdoc

+5
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,11 @@ and was not consistent with other filters (e.g. `filter`).
12741274
Objects considered array-like include: arrays, array subclasses, strings, NodeLists,
12751275
jqLite/jQuery collections
12761276

1277+
#### Helper Functions:
1278+
1279+
The {@link angular.lowercase `angular.lowercase`} and {@link angular.uppercase `angular.uppercase`} functions have been **deprecated** and will be removed
1280+
in version 1.7.0. It is recommended to use [String.prototype.toLowerCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) and [String.prototype.toUpperCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) functions instead.
1281+
12771282

12781283
### ngAria
12791284

src/Angular.js

+32
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,41 @@ var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/;
122122
// This is used so that it's possible for internal tests to create mock ValidityStates.
123123
var VALIDITY_STATE_PROPERTY = 'validity';
124124

125+
125126
var hasOwnProperty = Object.prototype.hasOwnProperty;
126127

128+
/**
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.
138+
*
139+
* @description Converts the specified string to lowercase.
140+
* @param {string} string String to be converted to lowercase.
141+
* @returns {string} Lowercased string.
142+
*/
127143
var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};
144+
145+
/**
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.
155+
*
156+
* @description Converts the specified string to uppercase.
157+
* @param {string} string String to be converted to uppercase.
158+
* @returns {string} Uppercased string.
159+
*/
128160
var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};
129161

130162

0 commit comments

Comments
 (0)