Extract typeOf to it's own file
Merge pull request #545 from mroderick/extract-typeOf

Extract typeOf to it's own file