Skip to content

Instantly share code, notes, and snippets.

@colinhicks
Created January 11, 2013 17:01
Show Gist options
  • Save colinhicks/4512317 to your computer and use it in GitHub Desktop.
Save colinhicks/4512317 to your computer and use it in GitHub Desktop.
musing on projection signature for `treety` – a recursive directory creator
var treetyIterator = function(obj) {
var leaf = {
children: [{
name: 'a1',
children: [{
name: 'b1',
children: [{
name: obj.id,
files: [{
name: 'c1.txt',
content: obj.txt1
}, {
name: 'c2.txt',
content: obj.txt2
}]
}]
}]
}]
};
return leaf;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment