Sha256: 05d79e201216952cad38a69fb190e47ef4bad6d9cc6f92cfa3d70d1edfb39051
Contents?: true
Size: 553 Bytes
Versions: 6
Compression:
Stored size: 553 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 filterUsedParameterTypes = (options, parameters) => { const newOptions = cloneDeep(options); // hostparam can be used multiple times const alreadyUsed = parameters.map(item => item["type"]).filter(item => item != 'hostparam'); alreadyUsed.forEach(item => delete newOptions[item]) return newOptions; }
Version data entries
6 entries across 6 versions & 1 rubygems