Nodejs String Include include(pattern)

Here you can find the source of include(pattern)

Method Source Code

//TODO: we maybe want to get rid of this.. right now I have no idea how to get the data that I configure here dynamically.

//TODO: move this somewhere more appropriate.
String.prototype.include = function (pattern) {
   return this.indexOf(pattern) > -1;
}

Related

  1. include(pattern)
    String.prototype.include = function(pattern) {
      return this.indexOf(pattern) > -1;
    };
    
  2. include(pattern)
    String.prototype.include = function(pattern) {
      return this.indexOf(pattern) !== -1;
    
  3. include(pattern)
    String.prototype.include = function (pattern) {
        return this.indexOf(pattern) > -1;
    enyo.singleton({
        name: "preware.Globals",
        published: {
            appVersion: "0.2"
    });
    ...
    
  4. include(x)
    String.prototype.include = function(x){
      return this.indexOf(x) > -1
    
  5. includeString(search, start, caseSensitive, eachOther)
    String.prototype.includeString = function (search, start, caseSensitive, eachOther) {
      'use strict';
      caseSensitive = caseSensitive === void 0 ? false : !!caseSensitive;
      eachOther = eachOther === void 0 ? false : !!eachOther;
      if (caseSensitive) {
        return this.includes(search, start);
      if (typeof start !== 'number') {
        start = 0;
    ...
    
  6. includes( other )
    String.prototype.includes = function( other ){
      return !!other && this.indexOf( other) != -1
    function str_includes( that, other ){
      return !!other && that.indexOf( other) != -1