Skip to content

Instantly share code, notes, and snippets.

@devonwesley
Last active December 20, 2017 02:27
Show Gist options
  • Save devonwesley/872c51d3f0527973bcaa9a8babb6ecff to your computer and use it in GitHub Desktop.
Save devonwesley/872c51d3f0527973bcaa9a8babb6ecff to your computer and use it in GitHub Desktop.
This is how we create contracts, and display them in the view.
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