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

Commit c317433

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

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
@@ -701,6 +701,8 @@ This version of AngularJS is problematic due to a issue during its release. Plea
701701

702702
- The `ngTouch` module's `ngClick` directive has been deprecated and disabled by default. See the breaking
703703
changes section for more information
704+
- The `angular.lowercase` and `angular.uppercase` functions have been deprecated and will be removed
705+
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.
704706

705707
## Bug Fixes
706708

docs/content/guide/migration.ngdoc

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

116+
#### Helper Functions:
117+
118+
The {@link angular.lowercase `angular.lowercase`} and {@link angular.uppercase `angular.uppercase`} functions have been **deprecated** and will be removed
119+
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.
120+
116121

117122
### ngAria
118123

src/Angular.js

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

124+
124125
var hasOwnProperty = Object.prototype.hasOwnProperty;
125126

127+
/**
128+
* @ngdoc function
129+
* @name angular.lowercase
130+
* @module ng
131+
* @kind function
132+
*
133+
* @deprecated
134+
* sinceVersion="1.5.0"
135+
* removeVersion="1.7.0"
136+
* Use [String.prototype.toLowerCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) instead.
137+
*
138+
* @description Converts the specified string to lowercase.
139+
* @param {string} string String to be converted to lowercase.
140+
* @returns {string} Lowercased string.
141+
*/
126142
var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};
143+
144+
/**
145+
* @ngdoc function
146+
* @name angular.uppercase
147+
* @module ng
148+
* @kind function
149+
*
150+
* @deprecated
151+
* sinceVersion="1.5.0"
152+
* removeVersion="1.7.0"
153+
* Use [String.prototype.toUpperCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) instead.
154+
*
155+
* @description Converts the specified string to uppercase.
156+
* @param {string} string String to be converted to uppercase.
157+
* @returns {string} Uppercased string.
158+
*/
127159
var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};
128160

129161

0 commit comments

Comments
 (0)