You can create your own libraries of functions through the Tools menu. These functions will be available only throughout your company. 



Step1


Navigate to Tools section




Step 2


Create a new tool or select the existing one (double click)




Step 3


Name your tool and enter the code for your function. It has to have the following format:


this.yourFunctionName = function(param1, param2, param3) {
  // Your code here
}




Step 3


Click save and you are done! Now you can reference your newly created tool in any of your scripts in the following format:


tools.yourToolName.yourFunctionName (param1, param2, param3);