Created
February 28, 2018 23:28
-
-
Save santaclauze/76c9c31240f324225e79288dac1ff3bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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