Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab Maintenance 28.03.2025 | 20:00 - 23:00 MEZ
Show more breadcrumbs
xrm
basic
Commits
e1a4e278
Commit
e1a4e278
authored
6 years ago
by
Johannes Hörmann
Browse files
Options
Downloads
Patches
Plain Diff
staticLibExample
parent
f6156524
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
others/guide/staticLibExample.adoc
+52
-0
52 additions, 0 deletions
others/guide/staticLibExample.adoc
with
52 additions
and
0 deletions
others/guide/staticLibExample.adoc
0 → 100644
+
52
−
0
View file @
e1a4e278
= 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment