Skip to content
Snippets Groups Projects
Commit e1a4e278 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

staticLibExample

parent f6156524
No related branches found
No related tags found
No related merge requests found
= Example for a static Lib =
Remember to always change the comments to fit your class!
[source,javascript]
----
import("...");
/**
* a static Example Utility class
*
* Do not create an instance of this!
* @class
*/
function ExampleUtils() {}
/**
* a public static function
*
* @param {String} param1 is for ...
* @param {String} param2 is for ...
*
* @example var myResult = ExampleUtils.staticFunction1("p1", "p2");
*
* @return {String} a result
*/
ExampleUtils.staticFunction1 = function(param1, param2)
{
return this._privateStaticFunction1(param1, param2, "-")
}
/**
* a private static function
*
* Do not use outside of ExampleUtils!
*
* @param {String} param1 is for ...
* @param {String} param2 is for ...
* @param {String} param3 is for ...
*
* @return {String} a result
*/
ExampleUtils._privateStaticFunction1 = function(param1, param2, param3)
{
if(param1 && param2) {
...
return param1 + param3 + param2;
}
return "";
}
----
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment