add iterateTokensByType to JsFile prototype, closes #116