BREAKING CHANGE(scope): change scope to @pushrocks

This commit is contained in:
2018-07-21 14:37:39 +02:00
parent e9899e5451
commit 62336aa2cf
42 changed files with 1312 additions and 1289 deletions

View File

@@ -1,18 +1,18 @@
import * as plugins from './smartstring.plugins'
import * as plugins from './smartstring.plugins';
/**
* converts an erray of env strings from docker remote api to an usable object.
* @param envArrayArg
* @returns {}
*/
export const makeEnvObject = function (envArrayArg: string[]) {
let returnObject = {}
let regexString = /(.*)=(.*)/
export const 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 regexMatches = regexString.exec(envArrayArg[envKey]);
returnObject[regexMatches[1]] = regexMatches[2];
}
}
return returnObject
}
return returnObject;
};