How to use the function from another js file .
example:
The master.js file contain the following code.
if(typeof(CONVERTER) == "undefined") var CONVERTER = {};
(function(_e) {
"use strict";
var synmonth = 29.530588853; //synodic month (new Moon to new Moon)
var ptsa = new Array(485, 203, 199, 14, 12, 12, 12, 9, 8)
var ptsb = new Array(324.96, 337.23,320.81, 227.73, 15.45)
var ptsc = new Array(1934.136, 4777.259, 1222.114, 16859.074)
function GetAdjusted(yea,mx,dx){
.......
return(result);
}
_e.GetAdjusted = function(yea,mx,dx) {
return GetAdjusted(yea,mx,dx);
};
}(CONVERTER));
How to use/declare the function in another js file using node.js
requirethe module. nodejs.org/api/modules.html