uniformize
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -20,4 +20,5 @@ "use strict"; | ||
String.prototype.subText = function(query, strict) { | ||
if (strict) return this.standardize() === query?.standardize(); | ||
return this.standardize().includes(query?.standardize() ?? ""); | ||
if (!query) return false; | ||
if (strict) return this.standardize() === query.standardize(); | ||
return this.standardize().includes(query.standardize()); | ||
}; | ||
@@ -24,0 +25,0 @@ String.prototype.unidecode = function(keepAccent) { |
@@ -24,3 +24,3 @@ interface String { | ||
*/ | ||
subText(query?: string, strict?: boolean): boolean; | ||
subText(query?: string | null, strict?: boolean): boolean; | ||
/** | ||
@@ -27,0 +27,0 @@ * Capitalize the first letter of each word in a string. |
@@ -7,3 +7,3 @@ { | ||
"type": "commonjs", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"repository": { | ||
@@ -10,0 +10,0 @@ "type": "git", |
@@ -21,4 +21,5 @@ String.prototype.removeAccents = function () { | ||
String.prototype.subText = function (query?: string | null, strict?: boolean) { | ||
if (strict) return this.standardize() === query?.standardize(); | ||
return this.standardize().includes(query?.standardize() ?? ""); | ||
if (!query) return false; | ||
if (strict) return this.standardize() === query.standardize(); | ||
return this.standardize().includes(query.standardize()); | ||
}; | ||
@@ -25,0 +26,0 @@ |
@@ -24,3 +24,3 @@ interface String { | ||
*/ | ||
subText(query?: string, strict?: boolean): boolean; | ||
subText(query?: string | null, strict?: boolean): boolean; | ||
/** | ||
@@ -27,0 +27,0 @@ * Capitalize the first letter of each word in a string. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15291
177