Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 1.31
  • master
  • 1.10.0
  • 1.30.1
  • 1.31.0
  • 1.8.0
  • 1.9.0
  • 3.100.0
  • 3.100.1
  • 3.100.10
  • 3.100.11
  • 3.100.12
  • 3.100.13
  • 3.100.14
  • 3.100.15
  • 3.100.16
  • 3.100.17
  • 3.100.18
  • 3.100.19
  • 3.100.2
  • 3.100.20
  • 3.100.3
  • 3.100.4
  • 3.100.5
  • 3.100.6
  • 3.100.7
  • 3.100.8
  • 3.100.9
  • 3.101.0
  • 3.101.1
  • 3.101.2
  • 3.101.3
  • 3.102.0
  • 3.102.1
  • 3.102.2
  • 3.102.3
  • 3.102.4
  • 3.102.5
  • 3.102.6
  • 3.103.0
  • 3.103.1
  • 3.104.0
  • 3.104.1
  • 3.105.0
  • 3.105.1
  • 3.105.2
  • 3.106.0
  • 3.106.1
  • 3.107.0
  • 3.108.0
  • 3.108.1
  • 3.108.2
  • 3.108.3
  • 3.108.4
  • 3.108.5
  • 3.109.0
  • 3.110.0
  • 3.110.1
  • 3.110.2
  • 3.110.3
  • 3.110.4
  • 3.111.0
  • 3.112.0
  • 3.112.1
  • 3.112.2
  • 3.112.3
  • 3.112.4
  • 3.113.0
  • 3.114.0
  • 3.114.1
  • 3.114.2
  • 3.114.3
  • 3.114.4
  • 3.114.5
  • 3.114.6
  • 3.114.7
  • 3.115.0
  • 3.115.1
  • 3.115.2
  • 3.115.3
  • 3.115.4
  • 3.116.0
  • 3.116.1
  • 3.117.0
  • 3.117.1
  • 3.117.2
  • 3.117.3
  • 3.118.0
  • 3.118.1
  • 3.119.0
  • 3.120.0
  • 3.121.0
  • 3.51.5
  • 3.52.0
  • 3.52.1
  • 3.53.0
  • 3.54.0
  • 3.55.0
  • 3.55.1
  • 3.55.2
  • 3.55.3
  • 3.55.4
102 results

Target

Select target project
  • oss/libraries/javascript/monster
1 result
Select Git revision
  • 1.31
  • master
  • 1.10.0
  • 1.30.1
  • 1.31.0
  • 1.8.0
  • 1.9.0
  • 3.100.0
  • 3.100.1
  • 3.100.10
  • 3.100.11
  • 3.100.12
  • 3.100.13
  • 3.100.14
  • 3.100.15
  • 3.100.16
  • 3.100.17
  • 3.100.18
  • 3.100.19
  • 3.100.2
  • 3.100.20
  • 3.100.3
  • 3.100.4
  • 3.100.5
  • 3.100.6
  • 3.100.7
  • 3.100.8
  • 3.100.9
  • 3.101.0
  • 3.101.1
  • 3.101.2
  • 3.101.3
  • 3.102.0
  • 3.102.1
  • 3.102.2
  • 3.102.3
  • 3.102.4
  • 3.102.5
  • 3.102.6
  • 3.103.0
  • 3.103.1
  • 3.104.0
  • 3.104.1
  • 3.105.0
  • 3.105.1
  • 3.105.2
  • 3.106.0
  • 3.106.1
  • 3.107.0
  • 3.108.0
  • 3.108.1
  • 3.108.2
  • 3.108.3
  • 3.108.4
  • 3.108.5
  • 3.109.0
  • 3.110.0
  • 3.110.1
  • 3.110.2
  • 3.110.3
  • 3.110.4
  • 3.111.0
  • 3.112.0
  • 3.112.1
  • 3.112.2
  • 3.112.3
  • 3.112.4
  • 3.113.0
  • 3.114.0
  • 3.114.1
  • 3.114.2
  • 3.114.3
  • 3.114.4
  • 3.114.5
  • 3.114.6
  • 3.114.7
  • 3.115.0
  • 3.115.1
  • 3.115.2
  • 3.115.3
  • 3.115.4
  • 3.116.0
  • 3.116.1
  • 3.117.0
  • 3.117.1
  • 3.117.2
  • 3.117.3
  • 3.118.0
  • 3.118.1
  • 3.119.0
  • 3.120.0
  • 3.121.0
  • 3.51.5
  • 3.52.0
  • 3.52.1
  • 3.53.0
  • 3.54.0
  • 3.55.0
  • 3.55.1
  • 3.55.2
  • 3.55.3
  • 3.55.4
102 results
Show changes
......@@ -14,13 +14,13 @@ import {ProxyObserver} from "./proxyobserver.mjs";
import { validateObject } from "./validate.mjs";
import { isObject } from "./is.mjs";
export {equipWithInternal}
export { equipWithInternal };
/**
* @private
* @type {string}
*/
const propertyName = 'internalDefaults'
const propertyName = "internalDefaults";
/**
* This function extends the given object with the following methods:
......@@ -45,7 +45,7 @@ function equipWithInternal() {
Object.defineProperty(self, propertyName, {
get: function () {
return {};
}
},
});
}
......@@ -61,7 +61,7 @@ function equipWithInternal() {
self["attachInternalObserver"] = (observer) => {
self[internalSymbol].attachObserver(observer);
return self;
}
};
/**
* Detach a observer
......@@ -72,7 +72,7 @@ function equipWithInternal() {
self["detachInternalObserver"] = (observer) => {
self[internalSymbol].detachObserver(observer);
return self;
}
};
/**
* Check if a observer is attached
......@@ -82,8 +82,7 @@ function equipWithInternal() {
*/
self["containsInternalObserver"] = (observer) => {
return self[internalSymbol].containsObserver(observer);
}
};
/**
* Set an internal value, nested internals can be specified by path `a.b.c`
......@@ -95,7 +94,7 @@ function equipWithInternal() {
self["setInternal"] = (path, value) => {
new Pathfinder(self[internalSymbol].getSubject()).setVia(path, value);
return self;
}
};
/**
* set multiple internals at once
......@@ -111,7 +110,7 @@ function equipWithInternal() {
extend(self[internalSymbol].getSubject(), defaults, options);
return self;
}
};
/**
* nested internals can be specified by path `a.b.c`
......@@ -124,14 +123,12 @@ function equipWithInternal() {
let value;
try {
value = new Pathfinder(self[internalSymbol]
.getRealSubject()).getVia(path);
} catch (e) {
}
value = new Pathfinder(self[internalSymbol].getRealSubject()).getVia(path);
} catch (e) {}
if (value === undefined) return defaultValue;
return value;
}
};
}
/**
......@@ -141,9 +138,8 @@ function equipWithInternal() {
* @return {boolean}
*/
function hasGetter(obj, prop) {
while (isObject(obj)) {
if (Object.getOwnPropertyDescriptor(obj, prop)?.['get']) {
if (Object.getOwnPropertyDescriptor(obj, prop)?.["get"]) {
return true;
}
obj = Object.getPrototypeOf(obj);
......@@ -168,8 +164,7 @@ function parseOptionsJSON(data) {
try {
let dataUrl = parseDataURL(data);
data = dataUrl.content;
} catch (e) {
}
} catch (e) {}
try {
obj = JSON.parse(data);
......
......@@ -142,7 +142,7 @@ function getMonsterVersion() {
}
/** don't touch, replaced by make with package.json version */
monsterVersion = new Version("3.33.0");
monsterVersion = new Version("3.34.0");
return monsterVersion;
}
......@@ -5,14 +5,46 @@
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
*/
const ENV_AWS_LAMBDA = 'aws-lambda';
const ENV_GOOGLE_FUNCTIONS = 'google-functions';
const ENV_ELECTRON = 'electron';
const ENV_NODE = 'node';
const ENV_BROWSER = 'browser';
const ENV_WEB_WORKER = 'web-worker';
const ENV_DENO = 'deno';
const ENV_UNKNOWN = 'unknown';
/**
* @memberOf Monster.Util
* @type {string}
*/
const ENV_AWS_LAMBDA = "aws-lambda";
/**
* @memberOf Monster.Util
* @type {string}
*/
const ENV_GOOGLE_FUNCTIONS = "google-functions";
/**
* @memberOf Monster.Util
* @type {string}
*/
const ENV_ELECTRON = "electron";
/**
* @memberOf Monster.Util
* @type {string}
*/
const ENV_NODE = "node";
/**
* @memberOf Monster.Util
* @type {string}
*/
const ENV_BROWSER = "browser";
/**
* @memberOf Monster.Util
* @type {string}
*/
const ENV_WEB_WORKER = "web-worker";
/**
* @memberOf Monster.Util
* @type {string}
*/
const ENV_DENO = "deno";
/**
* @memberOf Monster.Util
* @type {string}
*/
const ENV_UNKNOWN = "unknown";
/**
* Detects and returns the current runtime environment.
......@@ -27,33 +59,23 @@ const ENV_UNKNOWN = 'unknown';
* - 'react-native': React Native environment
* - 'unknown': Unknown environment
*
* @since 3.34.0
* @memberOf Monster.Util
* @returns {string} The detected runtime environment. Possible values are:
*/
function detectRuntimeEnvironment() {
// AWS Lambda environment
if (
typeof process !== 'undefined' &&
process.env != null &&
process.env.AWS_LAMBDA_FUNCTION_NAME
) {
if (typeof process !== "undefined" && process.env != null && process.env.AWS_LAMBDA_FUNCTION_NAME) {
return ENV_AWS_LAMBDA;
}
// Google Cloud Functions environment
if (
typeof process !== 'undefined' &&
process.env != null &&
process.env.FUNCTION_NAME
) {
if (typeof process !== "undefined" && process.env != null && process.env.FUNCTION_NAME) {
return ENV_GOOGLE_FUNCTIONS;
}
// Node.js environment
if (
typeof process !== 'undefined' &&
process.versions != null &&
process.versions.node != null
) {
if (typeof process !== "undefined" && process.versions != null && process.versions.node != null) {
// Electron environment
if (process.versions.electron != null) {
return ENV_ELECTRON;
......@@ -63,20 +85,20 @@ function detectRuntimeEnvironment() {
// Browser environment
if (
typeof window !== 'undefined' &&
typeof window.document !== 'undefined' &&
typeof navigator !== 'undefined' &&
typeof navigator.userAgent === 'string'
typeof window !== "undefined" &&
typeof window.document !== "undefined" &&
typeof navigator !== "undefined" &&
typeof navigator.userAgent === "string"
) {
// Web Worker environment
if (typeof self === 'object' && typeof importScripts === 'function') {
if (typeof self === "object" && typeof importScripts === "function") {
return ENV_WEB_WORKER;
}
return ENV_BROWSER;
}
// Deno environment
if (typeof Deno !== 'undefined') {
if (typeof Deno !== "undefined") {
return ENV_DENO;
}
......@@ -93,4 +115,5 @@ export {
ENV_WEB_WORKER,
ENV_DENO,
ENV_UNKNOWN,
detectRuntimeEnvironment}
\ No newline at end of file
detectRuntimeEnvironment,
};
......@@ -2,3 +2,4 @@
DOCUMENTATION_S3_PATH ?= s3://monsterjs.org/en/doc/$(COMPONENT_SLUG)/
\ No newline at end of file
{
"name": "monster",
"version": "3.33.0",
"version": "3.34.0",
"description": "monster",
"repository": {
"type": "git",
......
......@@ -7,7 +7,7 @@ describe('Monster', function () {
let monsterVersion
/** don´t touch, replaced by make with package.json version */
monsterVersion = new Version("3.33.0")
monsterVersion = new Version("3.34.0")
let m = getMonsterVersion();
......
......@@ -2,19 +2,30 @@
## Introduction
Monster JS is a JavaScript library for creating interactive web applications.
MonsterJS is a versatile JavaScript library designed to simplify the development of interactive web applications. It offers a range of functionalities, including DOM manipulation, internationalization (i18n), and data processing capabilities.
## Installation
npm install @schukai/monster
To install MonsterJS, use the following command:
```bash
npm install @schukai/monster
```
## Usage
Import MonsterJS into your project:
```javascript
import Monster from '@schukai/monster';
```
Then, you can use MonsterJS's features to enhance your web application.
## License
## Documentation
For detailed documentation and examples of how to use MonsterJS, please visit the official MonsterJS documentation.
AGPL-3.0
## License
This project is licensed under the AGPL-3.0 License.
\ No newline at end of file
{"version":"3.34.0"}
{"version":"3.35.0"}