racker/glimpse.js — pull request #60 by jverghese (2013-03-04 23:00:20+00:00)
Title: Derived data ordered evaluation (ready)

* Derived data can now have derived sources.
* Derived data can be added in any order, and the order is calculated from the dependency tree.
* Circular dependency resolution.

Example:
```javascript
{
id: 'A',
sources: 'B',
derivation: function() { ... }
}, {
id: 'B',
sources:'C, D',
derivation: function() { ... }
}, {
id: 'C',
sources: 'E',
derivation: function() { ... }
}, {
id: 'D',
sources: '*',
derivation: function() { ... }
}, {
id: 'E',
sources: 'F',
derivation: function() { ... }
}, {
id: 'F',
sources: 'D',
derivation: function() { ... }
}, {
id: 'G',
sources: '*',
derivation: function() { ... }
}
```

Results in a correct order of ``'D', 'F', 'E', 'C', 'B', 'A', 'G'``

When circular dependencies are detected, it does not throw an error. It returns an error string.