generator-begcode
Version:
Spring Boot + Angular/React/Vue in one handy generator
9 lines (8 loc) • 365 B
JavaScript
import JDLDeployment from '../../models/jdl-deployment.js';
export default { convertDeployments };
export function convertDeployments(parsedDeployments) {
if (!parsedDeployments) {
throw new Error('Deployments have to be passed so as to be converted.');
}
return parsedDeployments.map(parsedDeployment => new JDLDeployment(parsedDeployment));
}