diff --git a/.gitignore b/.gitignore
index 9f193ab..2de0d1f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-coverage/
+.yarn/
pages/
public/
node_modules/
diff --git a/dist/smartstring.create.d.ts b/dist/smartstring.create.d.ts
index cbfda2a..0f6c5f8 100644
--- a/dist/smartstring.create.d.ts
+++ b/dist/smartstring.create.d.ts
@@ -1,2 +1,2 @@
-export declare let createRandomString: (patternArg: string, lengthArg: number, optionsArg: any) => string;
-export declare let createCryptoRandomString: (lengthArg: any) => string;
+export declare const createRandomString: (patternArg: string, lengthArg: number, optionsArg: any) => string;
+export declare const createCryptoRandomString: (lengthArg: any) => string;
diff --git a/dist/smartstring.create.js b/dist/smartstring.create.js
index 8d97d62..539d320 100644
--- a/dist/smartstring.create.js
+++ b/dist/smartstring.create.js
@@ -7,4 +7,4 @@ exports.createRandomString = (patternArg, lengthArg, optionsArg) => {
exports.createCryptoRandomString = (lengthArg) => {
return plugins.cryptoRandomString(lengthArg);
};
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzdHJpbmcuY3JlYXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzdHJpbmcuY3JlYXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsaURBQWdEO0FBRXJDLFFBQUEsa0JBQWtCLEdBQUcsQ0FDOUIsVUFBa0IsRUFDbEIsU0FBaUIsRUFDakIsVUFBZSxFQUNQLEVBQUU7SUFDVixNQUFNLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxVQUFVLEVBQUUsU0FBUyxFQUFFLFVBQVUsQ0FBQyxDQUFBO0FBQzlELENBQUMsQ0FBQTtBQUVVLFFBQUEsd0JBQXdCLEdBQUcsQ0FBQyxTQUFTLEVBQVUsRUFBRTtJQUMxRCxNQUFNLENBQUMsT0FBTyxDQUFDLGtCQUFrQixDQUFDLFNBQVMsQ0FBQyxDQUFBO0FBQzlDLENBQUMsQ0FBQSJ9
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzdHJpbmcuY3JlYXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzdHJpbmcuY3JlYXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsaURBQWdEO0FBRW5DLFFBQUEsa0JBQWtCLEdBQUcsQ0FDaEMsVUFBa0IsRUFDbEIsU0FBaUIsRUFDakIsVUFBZSxFQUNQLEVBQUU7SUFDVixNQUFNLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxVQUFVLEVBQUUsU0FBUyxFQUFFLFVBQVUsQ0FBQyxDQUFBO0FBQzlELENBQUMsQ0FBQTtBQUVZLFFBQUEsd0JBQXdCLEdBQUcsQ0FBQyxTQUFTLEVBQVUsRUFBRTtJQUM1RCxNQUFNLENBQUMsT0FBTyxDQUFDLGtCQUFrQixDQUFDLFNBQVMsQ0FBQyxDQUFBO0FBQzlDLENBQUMsQ0FBQSJ9
\ No newline at end of file
diff --git a/dist/smartstring.docker.d.ts b/dist/smartstring.docker.d.ts
index 2649299..97bebec 100644
--- a/dist/smartstring.docker.d.ts
+++ b/dist/smartstring.docker.d.ts
@@ -3,4 +3,4 @@
* @param envArrayArg
* @returns {}
*/
-export declare let makeEnvObject: (envArrayArg: string[]) => {};
+export declare const makeEnvObject: (envArrayArg: string[]) => {};
diff --git a/dist/smartstring.docker.js b/dist/smartstring.docker.js
index 7794559..d2b3f2d 100644
--- a/dist/smartstring.docker.js
+++ b/dist/smartstring.docker.js
@@ -16,4 +16,4 @@ exports.makeEnvObject = function (envArrayArg) {
}
return returnObject;
};
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzdHJpbmcuZG9ja2VyLmpzIiwic291c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yxPQUFPLFdBQVcsS0FBSyxXQUFXLENBQUMsQ0FBQyxDQUFDO1FBQ3ZDLEdBQUcsQ0FBQyxDQUFDLElBQUksTUFBTSxJQUFJLFdBQVcsQ0FBQyxDQUFDLENBQUM7WUFDL0IsSUFBSSxZQUFZLEdBQUcsV0FBVyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUUsTUFBTSxDQUFFLENBQUMsQ0FBQTtZQUMxRCxZQUFZLENBQUUsWUFBWSxDQUFFLENBQUMsQ0FBRSxDQUFFLEdBQUcsWUFBWSxDQUFFLENBQUMsQ0FBRSxDQUFBO1FBQ3ZELENBQUM7SUFDSCxDQUFDO0lBQ0QsTUFBTSxDQUFDLFlBQVksQ0FBQTtBQUNyQixDQUFDLENBQUEifQ==
\ No newline at end of file
diff --git a/dist/smartstring.git.js b/dist/smartstring.git.js
index a036de5..b1d3924 100644
--- a/dist/smartstring.git.js
+++ b/dist/smartstring.git.js
@@ -18,12 +18,12 @@ exports.GitRepo = GitRepo;
/* ---------------------------------------------- *
* ------------------ helpers ------------------- *
* ---------------------------------------------- */
-let gitRegex = function (stringArg) {
- let regexString = /([a-zA-Z0-9\-\.]*)(?:\/|\:)([a-zA-Z0-9\-\.]*)(?:\/)([a-zA-Z0-9\-\.]*)(?:\.git)/;
+const gitRegex = function (stringArg) {
+ const regexString = /([a-zA-Z0-9\-\.]*)(?:\/|\:)([a-zA-Z0-9\-\.]*)(?:\/)([a-zA-Z0-9\-\.]*)(?:\.git)/;
let regexMatches = regexString.exec(stringArg);
return regexMatches;
};
-let gitLink = function (hostArg, userArg, repoArg, tokenArg = '', linkTypeArg) {
+const gitLink = function (hostArg, userArg, repoArg, tokenArg = '', linkTypeArg) {
let returnString;
if (tokenArg !== '') {
tokenArg = tokenArg + '@';
@@ -43,4 +43,4 @@ let gitLink = function (hostArg, userArg, repoArg, tokenArg = '', linkTypeArg) {
}
return returnString;
};
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaW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BQUMsQ0FBQTtBQUVELE1BQU0sT0FBTyxHQUFHLFVBQVUsT0FBZSxFQUFFLE9BQWUsRUFBRSxPQUFlLEVBQUUsV0FBbUIsRUFBRSxFQUFFLFdBQVc7SUFDN0csSUFBSSxZQUFZLENBQUE7SUFDaEIsRUFBRSxDQUFDLENBQUMsUUFBUSxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUM7UUFDcEIsUUFBUSxHQUFHLFFBQVEsR0FBRyxHQUFHLENBQUE7SUFDM0IsQ0FBQztJQUNELE1BQU0sQ0FBQyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUM7UUFDcEIsS0FBSyxPQUFPO1lBQ1YsWUFBWSxHQUFHLFVBQVU7Z0JBQ3ZCLFFBQVEsR0FBRyxPQUFPLEdBQUcsR0FBRyxHQUFHLE9BQU8sR0FBRyxHQUFHLEdBQUcsT0FBTyxHQUFHLE1BQU0sQ0FBQTtZQUM3RCxLQUFLLENBQUE7UUFDUCxLQUFLLEtBQUs7WUFDUixZQUFZLEdBQUcsTUFBTTtnQkFDbkIsT0FBTyxHQUFHLEdBQUcsR0FBRyxPQUFPLEdBQUcsR0FBRyxHQUFHLE9BQU8sR0FBRyxNQUFNLENBQUE7WUFDbEQsS0FBSyxDQUFBO1FBQ1A7WUFDRSxPQUFPLENBQUMsS0FBSyxDQUFDLFlBQVksR0FBRyxXQUFXLEdBQUcsWUFBWSxDQUFDLENBQUE7WUFDeEQsS0FBSyxDQUFBO0lBQ1QsQ0FBQztJQUNELE1BQU0sQ0FBQyxZQUFZLENBQUE7QUFDckIsQ0FBQyxDQUFBIn0=
\ No newline at end of file
diff --git a/dist/smartstring.indent.d.ts b/dist/smartstring.indent.d.ts
index f4a5f69..0394125 100644
--- a/dist/smartstring.indent.d.ts
+++ b/dist/smartstring.indent.d.ts
@@ -3,11 +3,11 @@
* @param stringArg
* @param spaceAmount
*/
-export declare let indent: (stringArg: string, spaceAmount: number) => string;
+export declare const indent: (stringArg: string, spaceAmount: number) => string;
/**
* indents a string with prefix
* @param stringArg
* @param prefixArg
*/
-export declare let indentWithPrefix: (stringArg: string, prefixArg: string) => string;
-export declare let normalize: (stringArg: string) => string;
+export declare const indentWithPrefix: (stringArg: string, prefixArg: string) => string;
+export declare const normalize: (stringArg: string) => string;
diff --git a/dist/smartstring.indent.js b/dist/smartstring.indent.js
index 9147c68..98267b9 100644
--- a/dist/smartstring.indent.js
+++ b/dist/smartstring.indent.js
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
* splits a string into an array
* @param stringArg
*/
-let splitStringAtLineBreak = (stringArg) => {
+const splitStringAtLineBreak = (stringArg) => {
let resultArray = stringArg.split('\n');
return cleanStringArray(resultArray);
};
@@ -12,7 +12,7 @@ let splitStringAtLineBreak = (stringArg) => {
* joins a string together again
* @param stringArrayArg
*/
-let joinStringWithLineBreaks = (stringArrayArg) => {
+const joinStringWithLineBreaks = (stringArrayArg) => {
let resultString = '';
for (let line of stringArrayArg) {
resultString = resultString + line + '\n'; // add new line at end
@@ -23,7 +23,7 @@ let joinStringWithLineBreaks = (stringArrayArg) => {
* cleans first and last line in case they are empty
* @param stringArrayArg
*/
-let cleanStringArray = (stringArrayArg) => {
+const cleanStringArray = (stringArrayArg) => {
let testRegex = /^[\s]*$/;
if (testRegex.test(stringArrayArg[0])) {
stringArrayArg.shift();
@@ -65,8 +65,8 @@ exports.normalize = (stringArg) => {
let resultString;
let splitStringArray = splitStringAtLineBreak(stringArg);
let minCommonLeftOffset;
- let deIndentRegex = /^(\s*)/;
- let emptyLineRegex = /^(\s*)$/;
+ const deIndentRegex = /^(\s*)/;
+ const emptyLineRegex = /^(\s*)$/;
for (let stringItem of splitStringArray) {
let offsetString = deIndentRegex.exec(stringItem)[1];
if ((typeof minCommonLeftOffset === 'undefined' || offsetString.length < minCommonLeftOffset)
@@ -82,4 +82,4 @@ exports.normalize = (stringArg) => {
resultString = joinStringWithLineBreaks(resultSplitStringArray);
return resultString;
};
-//# sourceMappingUR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HNCQUFzQixHQUFHLEVBQUUsQ0FBQTtJQUMvQixHQUFHLENBQUMsQ0FBQyxJQUFJLFVBQVUsSUFBSSxnQkFBZ0IsQ0FBQyxDQUFDLENBQUM7UUFDeEMsc0JBQXNCLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsbUJBQW1CLENBQUMsQ0FBQyxDQUFBO0lBQ3JFLENBQUM7SUFDRCxZQUFZLEdBQUcsd0JBQXdCLENBQUMsc0JBQXNCLENBQUMsQ0FBQTtJQUMvRCxNQUFNLENBQUMsWUFBWSxDQUFBO0FBQ3JCLENBQUMsQ0FBQSJ9
\ No newline at end of file
diff --git a/dist/smartstring.normalize.d.ts b/dist/smartstring.normalize.d.ts
index dbdec3e..2fa2b9c 100644
--- a/dist/smartstring.normalize.d.ts
+++ b/dist/smartstring.normalize.d.ts
@@ -4,9 +4,9 @@
* @param searchRegExp
* @param replacementString
*/
-export declare let replaceAll: (stringArg: string, searchRegExp: any, replacementString: string) => string;
+export declare const replaceAll: (stringArg: string, searchRegExp: any, replacementString: string) => string;
/**
* normalizes a string
* @param stringArg
*/
-export declare let standard: (stringArg: string) => string;
+export declare const standard: (stringArg: string) => string;
diff --git a/dist/smartstring.normalize.js b/dist/smartstring.normalize.js
index 8cb0f6f..2cd0f68 100644
--- a/dist/smartstring.normalize.js
+++ b/dist/smartstring.normalize.js
@@ -20,4 +20,4 @@ exports.standard = (stringArg) => {
let fix3 = exports.replaceAll(fix2, /\t/, ' '); // fix tabs
return fix3;
};
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzdHJpbmcubm9ybWFsaXplLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzdHJpbmcubm9ybWFsaXplLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsaURBQWdEO0FBRWhEOzs7OztHQUtHO0FBQ1EsUUFBQSxV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sR0FBRyxDQUFDLEVBQUUsaUJBQWlCLENBQUMsQ0FBQTtBQUM1RSxDQUFDLENBQUE7QUFFRDs7O0dBR0c7QUFDVSxRQUFBLFFBQVEsR0FBRyxDQUFDLFNBQWlCLEVBQVUsRUFBRTtJQUNwRCxJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsV0FBVyxDQUFDLFNBQVMsQ0FBQyxDQUFBLENBQUMsZ0JBQWdCO0lBQzFELElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUMsQ0FBQSxDQUFDLGVBQWU7SUFDekQsSUFBSSxJQUFJLEdBQUcsa0JBQVUsQ0FBQyxJQUFJLEVBQUUsSUFBSSxFQUFFLEdBQUcsQ0FBQyxDQUFBLENBQUMsV0FBVztJQUNsRCxNQUFNLENBQUMsSUFBSSxDQUFBO0FBQ2IsQ0FBQyxDQUFBIn0=
\ No newline at end of file
diff --git a/dist/smartstring.typescript.d.ts b/dist/smartstring.typescript.d.ts
index bed6024..aa521ae 100644
--- a/dist/smartstring.typescript.d.ts
+++ b/dist/smartstring.typescript.d.ts
@@ -1 +1 @@
-export declare let regexReferencePath: RegExp;
+export declare const regexReferencePath: RegExp;
diff --git a/dist/smartstring.typescript.js b/dist/smartstring.typescript.js
index 531b5f0..69e6136 100644
--- a/dist/smartstring.typescript.js
+++ b/dist/smartstring.typescript.js
@@ -1,4 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.regexReferencePath = /\/\/\/\s*\s*[\\n]?/;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzdHJpbmcudHlwZXNjcmlwdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0c3RyaW5nLnR5cGVzY3JpcHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFVyxRQUFBLGtCQUFrQixHQUFHLDhEQUE4RCxDQUFBIn0=
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzdHJpbmcudHlwZXNjcmlwdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0c3RyaW5nLnR5cGVzY3JpcHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFYSxRQUFBLGtCQUFrQixHQUFHLDhEQUE4RCxDQUFBIn0=
\ No newline at end of file
diff --git a/npmextra.json b/npmextra.json
index 5aed605..9c94086 100644
--- a/npmextra.json
+++ b/npmextra.json
@@ -3,5 +3,10 @@
"npmGlobalTools": [
"npmts"
]
+ },
+ "npmdocker": {
+ "baseImage": "hosttoday/ht-docker-node:npmci",
+ "command": "npmci node install stable && npmci npm install && npmci npm test",
+ "dockerSock": false
}
}
\ No newline at end of file
diff --git a/ts/smartstring.create.ts b/ts/smartstring.create.ts
index 783e6b6..b6a0685 100644
--- a/ts/smartstring.create.ts
+++ b/ts/smartstring.create.ts
@@ -1,6 +1,6 @@
import * as plugins from './smartstring.plugins'
-export let createRandomString = (
+export const createRandomString = (
patternArg: string,
lengthArg: number,
optionsArg: any
@@ -8,6 +8,6 @@ export let createRandomString = (
return plugins.randomatic(patternArg, lengthArg, optionsArg)
}
-export let createCryptoRandomString = (lengthArg): string => {
+export const createCryptoRandomString = (lengthArg): string => {
return plugins.cryptoRandomString(lengthArg)
}
diff --git a/ts/smartstring.docker.ts b/ts/smartstring.docker.ts
index 37021df..de1f461 100644
--- a/ts/smartstring.docker.ts
+++ b/ts/smartstring.docker.ts
@@ -5,7 +5,7 @@ import * as plugins from './smartstring.plugins'
* @param envArrayArg
* @returns {}
*/
-export let makeEnvObject = function (envArrayArg: string[]) {
+export const makeEnvObject = function (envArrayArg: string[]) {
let returnObject = {}
let regexString = /(.*)=(.*)/
if (typeof envArrayArg !== 'undefined') {
diff --git a/ts/smartstring.git.ts b/ts/smartstring.git.ts
index 19442f8..944d19e 100644
--- a/ts/smartstring.git.ts
+++ b/ts/smartstring.git.ts
@@ -24,13 +24,13 @@ export class GitRepo {
/* ---------------------------------------------- *
* ------------------ helpers ------------------- *
* ---------------------------------------------- */
-let gitRegex = function (stringArg: string) {
- let regexString = /([a-zA-Z0-9\-\.]*)(?:\/|\:)([a-zA-Z0-9\-\.]*)(?:\/)([a-zA-Z0-9\-\.]*)(?:\.git)/
+const gitRegex = function (stringArg: string) {
+ const regexString = /([a-zA-Z0-9\-\.]*)(?:\/|\:)([a-zA-Z0-9\-\.]*)(?:\/)([a-zA-Z0-9\-\.]*)(?:\.git)/
let regexMatches = regexString.exec(stringArg)
return regexMatches
}
-let gitLink = function (hostArg: string, userArg: string, repoArg: string, tokenArg: string = '', linkTypeArg): string {
+const gitLink = function (hostArg: string, userArg: string, repoArg: string, tokenArg: string = '', linkTypeArg): string {
let returnString
if (tokenArg !== '') {
tokenArg = tokenArg + '@'
diff --git a/ts/smartstring.indent.ts b/ts/smartstring.indent.ts
index f44f6df..0a9f59e 100644
--- a/ts/smartstring.indent.ts
+++ b/ts/smartstring.indent.ts
@@ -4,7 +4,7 @@ import * as plugins from './smartstring.plugins'
* splits a string into an array
* @param stringArg
*/
-let splitStringAtLineBreak = (stringArg: string): string[] => {
+const splitStringAtLineBreak = (stringArg: string): string[] => {
let resultArray = stringArg.split('\n')
return cleanStringArray(resultArray)
}
@@ -13,7 +13,7 @@ let splitStringAtLineBreak = (stringArg: string): string[] => {
* joins a string together again
* @param stringArrayArg
*/
-let joinStringWithLineBreaks = (stringArrayArg: string[]): string => {
+const joinStringWithLineBreaks = (stringArrayArg: string[]): string => {
let resultString: string = ''
for (let line of stringArrayArg) {
resultString = resultString + line + '\n' // add new line at end
@@ -25,7 +25,7 @@ let joinStringWithLineBreaks = (stringArrayArg: string[]): string => {
* cleans first and last line in case they are empty
* @param stringArrayArg
*/
-let cleanStringArray = (stringArrayArg: string[]): string[] => {
+const cleanStringArray = (stringArrayArg: string[]): string[] => {
let testRegex = /^[\s]*$/
if (testRegex.test(stringArrayArg[ 0 ])) {
stringArrayArg.shift()
@@ -41,7 +41,7 @@ let cleanStringArray = (stringArrayArg: string[]): string[] => {
* @param stringArg
* @param spaceAmount
*/
-export let indent = (stringArg: string, spaceAmount: number): string => {
+export const indent = (stringArg: string, spaceAmount: number): string => {
let localStringArray = splitStringAtLineBreak(stringArg)
for (let stringArg of localStringArray) {
stringArg = ' '.repeat(spaceAmount) + stringArg
@@ -55,7 +55,7 @@ export let indent = (stringArg: string, spaceAmount: number): string => {
* @param stringArg
* @param prefixArg
*/
-export let indentWithPrefix = (stringArg: string, prefixArg: string): string => {
+export const indentWithPrefix = (stringArg: string, prefixArg: string): string => {
let resultString: string
let stringArray = splitStringAtLineBreak(stringArg)
let resultArray: string[] = []
@@ -66,12 +66,14 @@ export let indentWithPrefix = (stringArg: string, prefixArg: string): string =>
return resultString
}
-export let normalize = (stringArg: string): string => {
+export const normalize = (stringArg: string): string => {
let resultString: string
let splitStringArray: string[] = splitStringAtLineBreak(stringArg)
let minCommonLeftOffset: number
- let deIndentRegex = /^(\s*)/
- let emptyLineRegex = /^(\s*)$/
+
+ const deIndentRegex = /^(\s*)/
+ const emptyLineRegex = /^(\s*)$/
+
for (let stringItem of splitStringArray) {
let offsetString = deIndentRegex.exec(stringItem)[ 1 ]
if (
diff --git a/ts/smartstring.normalize.ts b/ts/smartstring.normalize.ts
index 1f6233f..b411400 100644
--- a/ts/smartstring.normalize.ts
+++ b/ts/smartstring.normalize.ts
@@ -6,7 +6,7 @@ import * as plugins from './smartstring.plugins'
* @param searchRegExp
* @param replacementString
*/
-export let replaceAll = (stringArg: string, searchRegExp: any, replacementString: string) => {
+export const replaceAll = (stringArg: string, searchRegExp: any, replacementString: string) => {
return stringArg.replace(new RegExp(searchRegExp, 'g'), replacementString)
}
@@ -14,7 +14,7 @@ export let replaceAll = (stringArg: string, searchRegExp: any, replacementString
* normalizes a string
* @param stringArg
*/
-export let standard = (stringArg: string): string => {
+export const standard = (stringArg: string): string => {
let fix1 = plugins.stripIndent(stringArg) // fix indention
let fix2 = plugins.normalizeNewline(fix1) // fix newlines
let fix3 = replaceAll(fix2, /\t/, ' ') // fix tabs
diff --git a/ts/smartstring.typescript.ts b/ts/smartstring.typescript.ts
index 37f9136..c3fece1 100644
--- a/ts/smartstring.typescript.ts
+++ b/ts/smartstring.typescript.ts
@@ -1,3 +1,3 @@
import * as plugins from './smartstring.plugins'
-export let regexReferencePath = /\/\/\/\s*\s*[\\n]?/
+export const regexReferencePath = /\/\/\/\s*\s*[\\n]?/