Last active
December 20, 2017 02:27
-
-
Save devonwesley/872c51d3f0527973bcaa9a8babb6ecff to your computer and use it in GitHub Desktop.
This is how we create contracts, and display them in the view.
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 createContract(contract, panel) { | |
const propHandler = lists => props => { | |
if(!filterProps(props[0])) { | |
const container = categorizeContractProps({ | |
key: props[0], | |
value: props[1], | |
...lists | |
}) | |
container.append(createContractElement(props, container)) | |
} | |
} | |
createPropsContainers(panel, lists => Object | |
.entries(contract) | |
.forEach(propHandler(lists)) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment