mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
chore(Angular): remove superfluous fromCharCode function
Remove fromCharCode function as it was used only in two inner functions in the code, and its functionality is achieved in several other places by using String.fromCharCode Breaks fromCharCode closure function, String.fromCharCode should be used instead
This commit is contained in:
parent
564963dc27
commit
ef76afdf80
1 changed files with 2 additions and 4 deletions
|
|
@ -28,12 +28,12 @@ var uppercase = function(string){return isString(string) ? string.toUpperCase()
|
|||
|
||||
var manualLowercase = function(s) {
|
||||
return isString(s)
|
||||
? s.replace(/[A-Z]/g, function(ch) {return fromCharCode(ch.charCodeAt(0) | 32);})
|
||||
? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
|
||||
: s;
|
||||
};
|
||||
var manualUppercase = function(s) {
|
||||
return isString(s)
|
||||
? s.replace(/[a-z]/g, function(ch) {return fromCharCode(ch.charCodeAt(0) & ~32);})
|
||||
? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
|
||||
: s;
|
||||
};
|
||||
|
||||
|
|
@ -46,8 +46,6 @@ if ('i' !== 'I'.toLowerCase()) {
|
|||
uppercase = manualUppercase;
|
||||
}
|
||||
|
||||
function fromCharCode(code) {return String.fromCharCode(code);}
|
||||
|
||||
|
||||
var /** holds major version number for IE or NaN for real browsers */
|
||||
msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue