Created
January 9, 2015 13:51
-
-
Save omegahm/981b96f9f70659e20a30 to your computer and use it in GitHub Desktop.
This file contains 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
@sums = ko.computed => | |
$.map data.sums, (value, key) => | |
if @kinds().length is 0 || @kinds().indexOf(key) isnt -1 | |
value | |
.reduce (a, b) -> | |
a + b | |
, 0 |
Author
omegahm
commented
Jan 9, 2015
@sums = ko.computed =>
$.map data.sums, (value, key) =>
if @kinds().length is 0 || @kinds().indexOf(key) isnt -1
value
.reduce ((a, b) -> a + b), 0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment