burrows/statechart.js — pull request #1 by DouglasMeyer (2013-11-05 23:04:04+00:00)
Title: Some findings when going over statechart code.

1. I had a hard time wrapping my head around `multipleUniqs`. Renaming it to `notUnique` seems to make the function's intent clearer.
2. It looks like `origPath` and `origState` aren't being used (anymore).
3. Tracking the states in 2 properties seems like a bad idea. This is a potential fix (for a little cost).
4. The `|| this.substates[0]` seemed to repeat with the next conditional. `this.history && this.deep` seemed redundant, because `deep` stands for "deep history tracking" (maybe?).
5. There was a spot for initializing properties, so why not this one.

Also, I mentioned that the `_path` function sounds like it should return a string ("/root/state/baz"), and a name like `ancestors` would make more sense (but the name `ancestors` doesn't imply that it includes self).