bsatrom / Knockout.Unobtrusive

Unobtrusive View to ViewModel bindings for KnockoutJS
http://bsatrom.github.com/Knockout.Unobtrusive/
44 stars 1 forks source link

refactor binding type code #4

Closed bsatrom closed 13 years ago

bsatrom commented 13 years ago

Each binding currently requires a for loop, with the only difference between each being the binding object property and the name passed in for creating the data-bind attribute. So something similar to this is repeated several times throughout the source:

 for own valueKey, value of bindings.value
      createElementBinding bindings.value[valueKey], "value"

this can and should be cleaned up

bsatrom commented 13 years ago

finally made some time for this, and it went like butter. Just thought you might like to know