         @manifest_key = @prefix + "::manifest"
         localforage.config
             name: @prefix + "-db"
+
+    _get_evaluator: (module) ->
+        return switch module.type ? "cjs"
+            when "cjs" then CJSEvaluator
+            when "amd" then AMDEvaluator
+            when "junk" then PollutionEvaluator
+            when "raw" then RawEvaluator
+            else throw new TypeError("Invalid module type `#{module.type}`")
 
     _prepare_url: (url) ->
         return escape(url) unless @randomize_urls

            update_module_loaded_from_db: []
            evaluate_module_decoded: []

        @_evaluators =
            cjs: CJSEvaluator
            amd: AMDEvaluator
            junk: PollutionEvaluator
            raw: RawEvaluator

        @version = options.version
        @prefix = options.prefix
        @hash_name = options.hash_name

                    deps[alias] = @_all_modules[dep]
                deps["loader"] = this

                evaluator_type = @_get_evaluator(module)
                evaluator = new evaluator_type
                    id: module.id
                    source: module.source
                    dependencies: deps
