JS: prevent compiler from importing module more than once if not necessary. See KT-15260

This commit is contained in:
Alexey Andreev
2016-12-22 13:19:07 +03:00
committed by Alexey Andreev
parent 1ecd957981
commit 9b4b7960d3
7 changed files with 93 additions and 7 deletions
@@ -0,0 +1,12 @@
__beginModule__();
module.exports = function(param) {
switch (typeof param) {
case "number":
return "a";
case "string":
return "b";
default:
return "c";
}
};
__endModule__("lib");