@plexis/without-indent
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -6,3 +6,3 @@ /** | ||
* @example | ||
* | ||
* | ||
* withoutIndent('\t\t\tHello World'); // returns 'Hello World' | ||
@@ -9,0 +9,0 @@ * withoutIndent('\n\tHello\n\tWorld'); // returns '\nHello\nWorld' |
@@ -11,3 +11,3 @@ "use strict"; | ||
* @example | ||
* | ||
* | ||
* withoutIndent('\t\t\tHello World'); // returns 'Hello World' | ||
@@ -14,0 +14,0 @@ * withoutIndent('\n\tHello\n\tWorld'); // returns '\nHello\nWorld' |
{ | ||
"name": "@plexis/without-indent", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"main": "dist/index.js", | ||
@@ -26,3 +26,3 @@ "module": "dist/index.esm.js", | ||
}, | ||
"gitHead": "2d07bec95b551e1a656471e7d0a6d092ace0dd5a" | ||
"gitHead": "8a1bf713cf3bf48e13f25212c8be3fe05f15757f" | ||
} |
@@ -6,3 +6,3 @@ /** | ||
* @example | ||
* | ||
* | ||
* withoutIndent('\t\t\tHello World'); // returns 'Hello World' | ||
@@ -16,5 +16,5 @@ * withoutIndent('\n\tHello\n\tWorld'); // returns '\nHello\nWorld' | ||
const regex = new RegExp(`^[ \\t\\r]${howMany}|(?<=\\n+)[ \\t\\r]${howMany}`, 'g'); | ||
return text.replace(regex,''); | ||
} | ||
return text.replace(regex, ''); | ||
}; | ||
export default withoutIndent; |
4326