Alphabetical outliner?

Has anyone ever written a script that sorts the contents of the outliner to be alphabetical? I have a general idea of how it could be done, I was just wondering if it had been done yet...

--JeffD