Skip to content

Instantly share code, notes, and snippets.

{
"_meta": {
"sources": [
{
"json": "XUA2022CharacterOptions",
"abbreviation": "XUA22CO",
"full": "Unearthed Arcana 2022: Character Origins",
"authors": [
"Wizards of the Coast"
],
@bhatfield
bhatfield / alloy.js
Last active December 11, 2015 11:08
Alloy Plain Backbone Model-View Binding
var collection = Backbone.Collection.extend({
comparator: function(model){
return model.get('title');
}
});
var library = new collection([
{title: 'To Kill a Mockingbird', author:'Harper Lee'},
{title: 'The Catcher in the Rye', author:'J. D. Salinger'},
{title: 'Of Mice and Men', author:'John Steinbeck'},
@bhatfield
bhatfield / index.js
Last active December 11, 2015 10:48
Alloy Migration Test
$.index.open();
function doClick(e) {
Ti.API.info(JSON.stringify(e));
}
var library = Alloy.Collections.book;
library.fetch();
Ti.API.info(JSON.stringify(library));