Here you can find the source of equals(str)
String.prototype.equals = function(str) { return this === str; };
String.prototype.equals = function (item) { return this == item; };
String.prototype.equals = function(str){ return this.trim().toLowerCase() == str.trim().toLowerCase();
'use strict'; String.prototype.equals = function (val) { var isEquals = false; if (this === val || this + '' === val + '') { isEquals = true; return isEquals; };