Skip to content

Instantly share code, notes, and snippets.

@santaclauze
Created February 28, 2018 23:28
Show Gist options
  • Save santaclauze/76c9c31240f324225e79288dac1ff3bb to your computer and use it in GitHub Desktop.
Save santaclauze/76c9c31240f324225e79288dac1ff3bb to your computer and use it in GitHub Desktop.
const stepsConstructor = [];
for (let i = 0; i < children.length; i++) {
const step = children[i].props;
const stepPreparation = {};
stepPreparation.settings = {};
stepPreparation.options = {};
stepPreparation.settings.name = step.name;
stepPreparation.settings.status = step.status;
if (step.options) {
Object.assign(stepPreparation.options, step.options);
}
stepsConstructor.push(Object.assign({}, stepPreparation));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment