Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function mapToColumnProtoArray(columns: IColumnsDescriptor): dataform.IColumnDescriptor[] {
return utils.flatten(
Object.keys(columns).map(column => mapColumnDescriptionToProto([column], columns[column]))
);
}
description,
path: currentPath
})
];
}
const columnDescriptor: dataform.IColumnDescriptor[] = description.description
? [
dataform.ColumnDescriptor.create({
description: description.description,
path: currentPath
})
]
: [];
const nestedColumns = description.columns ? Object.keys(description.columns) : [];
return columnDescriptor.concat(
utils.flatten(
nestedColumns.map(nestedColumn =>
mapColumnDescriptionToProto(
currentPath.concat([nestedColumn]),
description.columns[nestedColumn]
)
)
)
);
}
description,
path: currentPath
})
];
}
const columnDescriptor: dataform.IColumnDescriptor[] = description.description
? [
dataform.ColumnDescriptor.create({
description: description.description,
path: currentPath
})
]
: [];
const nestedColumns = description.columns ? Object.keys(description.columns) : [];
return columnDescriptor.concat(
utils.flatten(
nestedColumns.map(nestedColumn =>
mapColumnDescriptionToProto(
currentPath.concat([nestedColumn]),
description.columns[nestedColumn]
)
)
)
);
}
export function mapToColumnProtoArray(columns: IColumnsDescriptor): dataform.IColumnDescriptor[] {
return utils.flatten(
Object.keys(columns).map(column => mapColumnDescriptionToProto([column], columns[column]))
);
}