code: function exportDeployments(deployments) {
    if (!deployments) {
      throw new Error('Deployments have to be passed to be exported.');
    }
    return Object.values(deployments).map(deployment => {
      checkForErrors(deployment);
      deployment = setUpDeploymentStructure(deployment);
      writeDeploymentConfigs(deployment);
      return deployment;
    });
  }
docs: Exports JDL deployments to .yo-rc.json files in separate folders (based on deployment type).
  @param deployments the deployments to export (key: deployment type, value: JDLDeployment- deployment config).
  @return object[] exported deployments in their final form.