Created
March 28, 2020 15:49
-
-
Save jsmanifest/0e09397eb2f06daca29263f8e1597d93 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
function transformAll({ type = '', style = {}, children = [] }) { | |
const result = { type, style: transformStyleObject(style), children } | |
if (Array.isArray(result.children)) { | |
result.children = result.children.map(transformAll) | |
} | |
return result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment