Sha256: ae135807825db671197327dabd7b7e7fa7e86c85b4addc858883fa4689f49421
Contents?: true
Size: 583 Bytes
Versions: 9
Compression:
Stored size: 583 Bytes
Contents
import { cloneDeep, } from 'lodash'; export const transformForemanData = (fdata) => { if (fdata === undefined) { return ""; } const result = {}; fdata.map(item => result[item.id] = item.name) return (result); } export const filterParameterTypes = (options, parameters) => { const newOptions = cloneDeep(options); // hostparam can be used multiple times const alreadyUsed = parameters.map(item => item["type"]).filter(item => item != 'hostparam'); // remove already used items alreadyUsed.forEach(item => delete newOptions[item]) return newOptions; }
Version data entries
9 entries across 9 versions & 1 rubygems