Nodejs String Equal equals(str)

Here you can find the source of equals(str)

Method Source Code

String.prototype.equals = function(str) {
    return this === str;
};

Related

  1. equals(item)
    String.prototype.equals = function (item) {
      return this == item;
    };
    
  2. equals(str)
    String.prototype.equals = function(str){
      return this.trim().toLowerCase() == str.trim().toLowerCase();
    
  3. equals(val)
    'use strict';
    String.prototype.equals = function (val) {
      var isEquals = false;
      if (this === val || this + '' === val + '') {
        isEquals = true;
      return isEquals;
    };