Skip to content

Instantly share code, notes, and snippets.

@Raynos Raynos/x.js Secret
Created Mar 25, 2013

Embed
What would you like to do?
var addMember = map(memberEvents, function (event) {
return function (state) {
var members = extend(state.members)
var value = event.value
var widget = Member(value, input)
membersHash[value.id] = value
members[value.id] = {
value: value
, elem: widget.view
}
return {
members: members
, currentWidget: widget
}
}
})
var updateMember = map(modifyEvents, function (event) {
return function (state) {
var value = event.value
var members = extend(state.members)
var orig = members[value.id]
members[value.id] = {
value: extend(orig.value, value)
, elem: orig.elem
}
return {
members: members
, currentWidget: null
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.