I have a 8000 line JS file, which I want to divide. My JS contains a single class with many methods under it. like
var myClass:{
method1:function(param1){
//Useful code
},
method2:function(param1){
//Useful code
},
method3:function(param1){
//Useful code
},
method4:function(param1){
//Useful code
},
........
}
Now I want to divide this file that means am going to divide the class itself. Can I define few function in one file and rest in another file inside the same class. Some thing like the bellow mentioned code
File1.js: var myClass:{
method1:function(param1){
//Useful code
},
method2:function(param1){
//Useful code
}
..........
}
File2.js:
var myClass:{
method3:function(param1){
//Useful code
},
method4:function(param1){
//Useful code
}
..........
}
Is there any way I can achieve this and How ?