13 lines
276 B
CoffeeScript
13 lines
276 B
CoffeeScript
Ember.computed.product = ->
|
|
args = []
|
|
for arg in arguments
|
|
args.push arg
|
|
callback = ->
|
|
product = 1
|
|
for key in args
|
|
continue unless typeof(key) is 'string'
|
|
product *= @get(key) || 0
|
|
product
|
|
args.push callback
|
|
Ember.computed.apply(@, args)
|