[New] Added appVersion property and hasComponent() function
(cherry picked from commit c081cd1be9
)
This commit is contained in:
parent
ea0d526c7e
commit
e910123eb4
20
Strolch.js
20
Strolch.js
|
@ -3,8 +3,10 @@
|
|||
*/
|
||||
Strolch = {
|
||||
|
||||
appVersion: null,
|
||||
|
||||
props: {
|
||||
strolch_js: '0.2.5',
|
||||
strolch_js: '0.2.6',
|
||||
version: null,
|
||||
revision: null,
|
||||
userConfig: null,
|
||||
|
@ -22,6 +24,12 @@ Strolch = {
|
|||
/*
|
||||
* configuration
|
||||
*/
|
||||
setAppVersion: function (appVersion) {
|
||||
this.appVersion = appVersion;
|
||||
},
|
||||
getAppVersion: function () {
|
||||
return this.appVersion;
|
||||
},
|
||||
getAuthToken: function () {
|
||||
return localStorage.authToken;
|
||||
},
|
||||
|
@ -151,6 +159,16 @@ Strolch = {
|
|||
return false;
|
||||
},
|
||||
|
||||
hasComponent: function (componentName) {
|
||||
for (var i = 0; i < this.appVersion.componentVersions.length; i++) {
|
||||
var componentV = this.appVersion.componentVersions[i];
|
||||
if (componentV.componentName == componentName)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
/*
|
||||
* Utils
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "strolchjs",
|
||||
"version": "0.2.5",
|
||||
"version": "0.2.6",
|
||||
"main": "strolch.js",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
|
|
Loading…
Reference in New Issue