update normalize of smartstring

This commit is contained in:
2017-10-05 15:55:59 +02:00
parent 974bf90703
commit 55d679e5ee
33 changed files with 801 additions and 570 deletions

View File

@@ -6,13 +6,13 @@ import * as plugins from './smartstring.plugins'
* @returns {}
*/
export let makeEnvObject = function (envArrayArg: string[]) {
let returnObject = {}
let regexString = /(.*)=(.*)/
if (typeof envArrayArg !== 'undefined') {
for (let envKey in envArrayArg) {
let regexMatches = regexString.exec(envArrayArg[envKey])
returnObject[regexMatches[1]] = regexMatches[2]
};
let returnObject = {}
let regexString = /(.*)=(.*)/
if (typeof envArrayArg !== 'undefined') {
for (let envKey in envArrayArg) {
let regexMatches = regexString.exec(envArrayArg[ envKey ])
returnObject[ regexMatches[ 1 ] ] = regexMatches[ 2 ]
}
return returnObject
}
return returnObject
}