diff --git a/src/Angular.js b/src/Angular.js index 48c31ea1a0b9..ef06dd4ad67a 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -173,15 +173,7 @@ function isValidObjectMaxDepth(maxDepth) { } /** - * @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. + * @private * * @description Converts the specified string to lowercase. * @param {string} string String to be converted to lowercase. @@ -190,15 +182,7 @@ function isValidObjectMaxDepth(maxDepth) { 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. + * @private * * @description Converts the specified string to uppercase. * @param {string} string String to be converted to uppercase. diff --git a/src/AngularPublic.js b/src/AngularPublic.js index e90814e8d1a9..0f563fc35418 100644 --- a/src/AngularPublic.js +++ b/src/AngularPublic.js @@ -150,8 +150,6 @@ function publishExternalAPI(angular) { 'isArray': isArray, 'version': version, 'isDate': isDate, - 'lowercase': lowercase, - 'uppercase': uppercase, 'callbacks': {$$counter: 0}, 'getTestability': getTestability, 'reloadWithDebugInfo': reloadWithDebugInfo, @@ -159,7 +157,9 @@ function publishExternalAPI(angular) { '$$csp': csp, '$$encodeUriSegment': encodeUriSegment, '$$encodeUriQuery': encodeUriQuery, - '$$stringify': stringify + '$$lowercase': lowercase, + '$$stringify': stringify, + '$$uppercase': uppercase }); angularModule = setupModuleLoader(window); diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index f35f462ec89b..11a87bd4058c 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -2072,13 +2072,13 @@ function MockXhr() { var header = this.$$respHeaders[name]; if (header) return header; - name = angular.lowercase(name); + name = angular.$$lowercase(name); header = this.$$respHeaders[name]; if (header) return header; header = undefined; angular.forEach(this.$$respHeaders, function(headerVal, headerName) { - if (!header && angular.lowercase(headerName) === name) header = headerVal; + if (!header && angular.$$lowercase(headerName) === name) header = headerVal; }); return header; }; diff --git a/src/ngSanitize/sanitize.js b/src/ngSanitize/sanitize.js index f5f7490c2f67..fca8d7c8fcc6 100644 --- a/src/ngSanitize/sanitize.js +++ b/src/ngSanitize/sanitize.js @@ -212,7 +212,7 @@ function $SanitizeProvider() { extend = angular.extend; forEach = angular.forEach; isDefined = angular.isDefined; - lowercase = angular.lowercase; + lowercase = angular.$$lowercase; noop = angular.noop; htmlParser = htmlParserImpl; diff --git a/src/ngTouch/touch.js b/src/ngTouch/touch.js index 5ae19d6b4a87..bead005079e6 100644 --- a/src/ngTouch/touch.js +++ b/src/ngTouch/touch.js @@ -27,7 +27,7 @@ var ngTouch = angular.module('ngTouch', []); ngTouch.provider('$touch', $TouchProvider); function nodeName_(element) { - return angular.lowercase(element.nodeName || (element[0] && element[0].nodeName)); + return angular.$$lowercase(element.nodeName || (element[0] && element[0].nodeName)); } /** diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 59c685753f99..d3917bd79ba5 100644 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -11353,7 +11353,7 @@ describe('$compile', function() { element = $compile('')($rootScope); $rootScope.html = $sce.trustAsHtml('
hello
'); $rootScope.$digest(); - expect(angular.lowercase(element.attr('srcdoc'))).toEqual('
hello
'); + expect(lowercase(element.attr('srcdoc'))).toEqual('
hello
'); })); }); } diff --git a/test/ng/directive/ngBindSpec.js b/test/ng/directive/ngBindSpec.js index b4e80b2f62d5..1d5cba43415e 100644 --- a/test/ng/directive/ngBindSpec.js +++ b/test/ng/directive/ngBindSpec.js @@ -176,17 +176,17 @@ describe('ngBind*', function() { element = $compile('
')($rootScope); $rootScope.html = '
hello
'; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('
hello
'); + expect(lowercase(element.html())).toEqual('
hello
'); })); it('should update html', inject(function($rootScope, $compile, $sce) { element = $compile('
')($rootScope); $rootScope.html = 'hello'; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('hello'); + expect(lowercase(element.html())).toEqual('hello'); $rootScope.html = 'goodbye'; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('goodbye'); + expect(lowercase(element.html())).toEqual('goodbye'); })); it('should one-time bind if the expression starts with two colons', inject(function($rootScope, $compile) { @@ -220,17 +220,17 @@ describe('ngBind*', function() { element = $compile('
')($rootScope); $rootScope.html = $sce.trustAsHtml('
hello
'); $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('
hello
'); + expect(lowercase(element.html())).toEqual('
hello
'); })); it('should update html', inject(function($rootScope, $compile, $sce) { element = $compile('
')($rootScope); $rootScope.html = $sce.trustAsHtml('hello'); $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('hello'); + expect(lowercase(element.html())).toEqual('hello'); $rootScope.html = $sce.trustAsHtml('goodbye'); $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('goodbye'); + expect(lowercase(element.html())).toEqual('goodbye'); })); it('should not cause infinite recursion for trustAsHtml object watches', @@ -243,7 +243,7 @@ describe('ngBind*', function() { return $sce.trustAsHtml('
hello
'); }; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('
hello
'); + expect(lowercase(element.html())).toEqual('
hello
'); })); it('should handle custom $sce objects', function() { @@ -266,10 +266,10 @@ describe('ngBind*', function() { var html = 'hello'; $rootScope.getHtml = function() { return $sce.trustAsHtml(html); }; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('hello'); + expect(lowercase(element.html())).toEqual('hello'); html = 'goodbye'; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('goodbye'); + expect(lowercase(element.html())).toEqual('goodbye'); }); }); @@ -280,7 +280,7 @@ describe('ngBind*', function() { element = $compile('
')($rootScope); $rootScope.html = '
hello
'; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('
hello
'); + expect(lowercase(element.html())).toEqual('
hello
'); })); }); }); diff --git a/test/ngSanitize/directive/ngBindHtmlSpec.js b/test/ngSanitize/directive/ngBindHtmlSpec.js index 6759c6d20fcd..74eb0f231baa 100644 --- a/test/ngSanitize/directive/ngBindHtmlSpec.js +++ b/test/ngSanitize/directive/ngBindHtmlSpec.js @@ -8,7 +8,7 @@ describe('ngBindHtml', function() { var element = $compile('
')($rootScope); $rootScope.html = '
hello
'; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('
hello
'); + expect(lowercase(element.html())).toEqual('
hello
'); })); @@ -18,11 +18,11 @@ describe('ngBindHtml', function() { angular.forEach([null, undefined, ''], function(val) { $rootScope.html = 'some val'; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual('some val'); + expect(lowercase(element.html())).toEqual('some val'); $rootScope.html = val; $rootScope.$digest(); - expect(angular.lowercase(element.html())).toEqual(''); + expect(lowercase(element.html())).toEqual(''); }); })); });