diff --git a/CHANGELOG.md b/CHANGELOG.md index 062624c701a4..c2989e83c9a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2028,6 +2028,7 @@ 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. It is recommended to use `String.prototype.toLowerCase` and `String.prototype.toUpperCase` functions instead. ## Bug Fixes diff --git a/src/Angular.js b/src/Angular.js index 3ca6be3bb50c..c52dc164c5a9 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -122,9 +122,33 @@ 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 + * + * @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 + * + * @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;};