Skip to content

Instantly share code, notes, and snippets.

@hcliff
hcliff / gist:5007872
Created February 21, 2013 20:22
get-in, set-in, update-in, nested group-by for underscore
# Extend underscore
_.mixin
lookupIterator: (v)->
if _.isFunction(v)
return v
return (o)-> o[v]
class Example.Views.Table extends Backbone.View
template: JST['example/table']
initialize: ->
@collection.on 'add', @addOne
render: ->
@$el.html @template()
@addAll()
@