<commit_before>Grid = require './lib/javascripts/grid'

collection = new Backbone.Collection [
  { greeting: 'hola', everyone: 'todos', boop: 'boop' }
  { greeting: 'hey', everyone: 'yall', boop: 'boop' }
  { greeting: 'beep', everyone: 'boop', boop: 'boop' }
]

grid = new Grid { collection }
grid.render()

document.querySelector('body').appendChild(grid.el).appendChild(document.createElement('br'))

columns = new Backbone.Collection [
  { label: 'hello', name: 'greeting' }
  { label: 'world', name: 'everyone' }
]

collection = new Backbone.Collection [
  { greeting: 'hola', everyone: 'todos'}
  { greeting: 'hey', everyone: 'yall'}
  { greeting: 'beep', everyone: 'boop'}
]

grid = new Grid { collection, columns }
grid.render()

document.querySelector('body').appendChild(grid.el).appendChild(document.createElement('br'))<commit_msg>Add nested collection example<commit_after>Grid = require './lib/javascripts/grid'

collection = new Backbone.Collection [
  { greeting: 'hola', everyone: 'todos', boop: 'boop' }
  { greeting: 'hey', everyone: 'yall', boop: 'boop' }
  { greeting: 'beep', everyone: 'boop', boop: 'boop' }
]

grid = new Grid { collection }
grid.render()

document.querySelector('body').appendChild(grid.el).appendChild(document.createElement('br'))

columns = new Backbone.Collection [
  { label: 'hello', name: 'greeting' }
  { label: 'world', name: 'everyone' }
]

collection = new Backbone.Collection [
  { greeting: 'hola', everyone: 'todos' }
  { greeting: 'hey', everyone: 'yall', collection: new Backbone.Collection [
    { greeting: 'yeh', everyone: 'llay' }
    { greeting: 'Huzzah!', everyone: '!!!' }
  ] }
  { greeting: 'beep', everyone: 'boop' }
]

grid = new Grid { collection, columns }
grid.render()

document.querySelector('body').appendChild(grid.el).appendChild(document.createElement('br'))
{'fraction_non_alphanumeric': 0.18147138964577655, 'fraction_numerical': 0.0, 'mean_word_length': 5.099667774086379, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2071020', 'n_tokens_mistral': 615, 'n_tokens_neox': 602, 'n_words': 138}