@danielkalen/simplybind
Version:
Magically simple, framework-less one-way/two-way data binding for frontend/backend in ~5kb.
32 lines (25 loc) • 740 B
text/coffeescript
new TestSuite
'title': 'Input x100 Update'
'subtitle': 'Update the value of 100 input fields 1,000 times'
'measureMethod': 'sync'
'warmUps': 100
'timesToRun': 1000
'setupFn': (container$)->
= 'prop':'value'
currentValue = 0
inputs = ('<input type="text">' for i in [1..100])
= $(inputs.join '')
for input in
SimplyBind('prop').of()
.to('value').of(input)
= ()-> "value#{currentValue++}"
container$.append
return
'teardownFn': (container$)->
container$.empty()
SimplyBind.unBindAll(, true)
SimplyBind.unBindAll(input, true) for input in
delete
delete
delete
'testFn': ()-> .prop = ()