Big, big fan of CoffeeScript and glad to see Dropbox hopping aboard.
That being said, some of their examples are lackluster.
@originalStyle = {}
for k in ['top', 'left', 'width', 'height']
@originalStyle[k] = @element.style[k]
Should really be something like:
@originalStyle = ['top', 'left', 'width', 'height'].reduce (hash, position) ->
hash[position] = @element.style[position]
hash
, {}
... though that shows off some CoffeeScript warts.
Also,
Sharing =
init: (sf_info) ->
for list in [sf_info.current, sf_info.past]
for info in list
@_decode_sort_key info
Why aren't they using CoffeeScript classes?
class Sharing
constructor: (sfInfo) ->
...
That being said, some of their examples are lackluster.
Should really be something like: ... though that shows off some CoffeeScript warts.Also,
Why aren't they using CoffeeScript classes?