Skip to content

Commit

Permalink
docs(*): add deprecation notice for angular.lowercase/uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleycho authored and Narretz committed Nov 28, 2016
1 parent c625b0d commit 4059600
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,8 @@ This version of AngularJS is problematic due to a issue during its release. Plea

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

## Bug Fixes

Expand Down
5 changes: 5 additions & 0 deletions docs/content/guide/migration.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,11 @@ and was not consistent with other filters (e.g. `filter`).
Objects considered array-like include: arrays, array subclasses, strings, NodeLists,
jqLite/jQuery collections

#### Helper Functions:

The {@link angular.lowercase `angular.lowercase`} and {@link angular.uppercase `angular.uppercase`} functions have been **deprecated** and will be removed
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.


### ngAria

Expand Down
32 changes: 32 additions & 0 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,41 @@ var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/;
// This is used so that it's possible for internal tests to create mock ValidityStates.
var VALIDITY_STATE_PROPERTY = 'validity';


var hasOwnProperty = Object.prototype.hasOwnProperty;

/**
* @ngdoc function
* @name angular.lowercase
* @module ng
* @kind function
*
* @deprecated
* sinceVersion="1.5.0"
* removeVersion="1.7.0"
* Use [String.prototype.toLowerCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) instead.
*
* @description Converts the specified string to lowercase.
* @param {string} string String to be converted to lowercase.
* @returns {string} Lowercased string.
*/
var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};

/**
* @ngdoc function
* @name angular.uppercase
* @module ng
* @kind function
*
* @deprecated
* sinceVersion="1.5.0"
* removeVersion="1.7.0"
* Use [String.prototype.toUpperCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) instead.
*
* @description Converts the specified string to uppercase.
* @param {string} string String to be converted to uppercase.
* @returns {string} Uppercased string.
*/
var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};


Expand Down

0 comments on commit 4059600

Please sign in to comment.