smartstring/dist/smartstring.docker.js

19 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

"use strict";
2017-10-05 13:55:59 +00:00
Object.defineProperty(exports, "__esModule", { value: true });
/**
* converts an erray of env strings from docker remote api to an usable object.
* @param envArrayArg
* @returns {}
*/
exports.makeEnvObject = function (envArrayArg) {
2016-07-17 15:30:26 +00:00
let returnObject = {};
let regexString = /(.*)=(.*)/;
2016-10-31 23:22:38 +00:00
if (typeof envArrayArg !== 'undefined') {
2016-08-03 13:41:36 +00:00
for (let envKey in envArrayArg) {
let regexMatches = regexString.exec(envArrayArg[envKey]);
returnObject[regexMatches[1]] = regexMatches[2];
}
}
return returnObject;
};
2017-10-05 13:55:59 +00:00
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzdHJpbmcuZG9ja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzdHJpbmcuZG9ja2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUE7Ozs7R0FJRztBQUNRLFFBQUEsYUFBYSxHQUFHLFVBQVUsV0FBcUI7SUFDeEQsSUFBSSxZQUFZLEdBQUcsRUFBRSxDQUFBO0lBQ3JCLElBQUksV0FBVyxHQUFHLFdBQVcsQ0FBQTtJQUM3QixFQUFFLENBQUMsQ0FBQyxPQUFPLFdBQVcsS0FBSyxXQUFXLENBQUMsQ0FBQyxDQUFDO1FBQ3ZDLEdBQUcsQ0FBQyxDQUFDLElBQUksTUFBTSxJQUFJLFdBQVcsQ0FBQyxDQUFDLENBQUM7WUFDL0IsSUFBSSxZQUFZLEdBQUcsV0FBVyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUUsTUFBTSxDQUFFLENBQUMsQ0FBQTtZQUMxRCxZQUFZLENBQUUsWUFBWSxDQUFFLENBQUMsQ0FBRSxDQUFFLEdBQUcsWUFBWSxDQUFFLENBQUMsQ0FBRSxDQUFBO1FBQ3ZELENBQUM7SUFDSCxDQUFDO0lBQ0QsTUFBTSxDQUFDLFlBQVksQ0FBQTtBQUNyQixDQUFDLENBQUEifQ==