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"; ...@@ -14,13 +14,13 @@ import {ProxyObserver} from "./proxyobserver.mjs";
import { validateObject } from "./validate.mjs"; import { validateObject } from "./validate.mjs";
import { isObject } from "./is.mjs"; import { isObject } from "./is.mjs";
export {equipWithInternal} export { equipWithInternal };
/** /**
* @private * @private
* @type {string} * @type {string}
*/ */
const propertyName = 'internalDefaults' const propertyName = "internalDefaults";
/** /**
* This function extends the given object with the following methods: * This function extends the given object with the following methods:
...@@ -45,7 +45,7 @@ function equipWithInternal() { ...@@ -45,7 +45,7 @@ function equipWithInternal() {
Object.defineProperty(self, propertyName, { Object.defineProperty(self, propertyName, {
get: function () { get: function () {
return {}; return {};
} },
}); });
} }
...@@ -61,7 +61,7 @@ function equipWithInternal() { ...@@ -61,7 +61,7 @@ function equipWithInternal() {
self["attachInternalObserver"] = (observer) => { self["attachInternalObserver"] = (observer) => {
self[internalSymbol].attachObserver(observer); self[internalSymbol].attachObserver(observer);
return self; return self;
} };
/** /**
* Detach a observer * Detach a observer
...@@ -72,7 +72,7 @@ function equipWithInternal() { ...@@ -72,7 +72,7 @@ function equipWithInternal() {
self["detachInternalObserver"] = (observer) => { self["detachInternalObserver"] = (observer) => {
self[internalSymbol].detachObserver(observer); self[internalSymbol].detachObserver(observer);
return self; return self;
} };
/** /**
* Check if a observer is attached * Check if a observer is attached
...@@ -82,8 +82,7 @@ function equipWithInternal() { ...@@ -82,8 +82,7 @@ function equipWithInternal() {
*/ */
self["containsInternalObserver"] = (observer) => { self["containsInternalObserver"] = (observer) => {
return self[internalSymbol].containsObserver(observer); return self[internalSymbol].containsObserver(observer);
} };
/** /**
* Set an internal value, nested internals can be specified by path `a.b.c` * Set an internal value, nested internals can be specified by path `a.b.c`
...@@ -95,7 +94,7 @@ function equipWithInternal() { ...@@ -95,7 +94,7 @@ function equipWithInternal() {
self["setInternal"] = (path, value) => { self["setInternal"] = (path, value) => {
new Pathfinder(self[internalSymbol].getSubject()).setVia(path, value); new Pathfinder(self[internalSymbol].getSubject()).setVia(path, value);
return self; return self;
} };
/** /**
* set multiple internals at once * set multiple internals at once
...@@ -111,7 +110,7 @@ function equipWithInternal() { ...@@ -111,7 +110,7 @@ function equipWithInternal() {
extend(self[internalSymbol].getSubject(), defaults, options); extend(self[internalSymbol].getSubject(), defaults, options);
return self; return self;
} };
/** /**
* nested internals can be specified by path `a.b.c` * nested internals can be specified by path `a.b.c`
...@@ -124,14 +123,12 @@ function equipWithInternal() { ...@@ -124,14 +123,12 @@ function equipWithInternal() {
let value; let value;
try { try {
value = new Pathfinder(self[internalSymbol] value = new Pathfinder(self[internalSymbol].getRealSubject()).getVia(path);
.getRealSubject()).getVia(path); } catch (e) {}
} catch (e) {
}
if (value === undefined) return defaultValue; if (value === undefined) return defaultValue;
return value; return value;
} };
} }
/** /**
...@@ -141,9 +138,8 @@ function equipWithInternal() { ...@@ -141,9 +138,8 @@ function equipWithInternal() {
* @return {boolean} * @return {boolean}
*/ */
function hasGetter(obj, prop) { function hasGetter(obj, prop) {
while (isObject(obj)) { while (isObject(obj)) {
if (Object.getOwnPropertyDescriptor(obj, prop)?.['get']) { if (Object.getOwnPropertyDescriptor(obj, prop)?.["get"]) {
return true; return true;
} }
obj = Object.getPrototypeOf(obj); obj = Object.getPrototypeOf(obj);
...@@ -168,8 +164,7 @@ function parseOptionsJSON(data) { ...@@ -168,8 +164,7 @@ function parseOptionsJSON(data) {
try { try {
let dataUrl = parseDataURL(data); let dataUrl = parseDataURL(data);
data = dataUrl.content; data = dataUrl.content;
} catch (e) { } catch (e) {}
}
try { try {
obj = JSON.parse(data); obj = JSON.parse(data);
......
...@@ -142,7 +142,7 @@ function getMonsterVersion() { ...@@ -142,7 +142,7 @@ function getMonsterVersion() {
} }
/** don't touch, replaced by make with package.json version */ /** don't touch, replaced by make with package.json version */
monsterVersion = new Version("3.33.0"); monsterVersion = new Version("3.34.0");
return monsterVersion; return monsterVersion;
} }
...@@ -5,14 +5,46 @@ ...@@ -5,14 +5,46 @@
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html * 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'; * @memberOf Monster.Util
const ENV_ELECTRON = 'electron'; * @type {string}
const ENV_NODE = 'node'; */
const ENV_BROWSER = 'browser'; const ENV_AWS_LAMBDA = "aws-lambda";
const ENV_WEB_WORKER = 'web-worker'; /**
const ENV_DENO = 'deno'; * @memberOf Monster.Util
const ENV_UNKNOWN = 'unknown'; * @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. * Detects and returns the current runtime environment.
...@@ -27,33 +59,23 @@ const ENV_UNKNOWN = 'unknown'; ...@@ -27,33 +59,23 @@ const ENV_UNKNOWN = 'unknown';
* - 'react-native': React Native environment * - 'react-native': React Native environment
* - 'unknown': Unknown environment * - 'unknown': Unknown environment
* *
* @since 3.34.0
* @memberOf Monster.Util
* @returns {string} The detected runtime environment. Possible values are: * @returns {string} The detected runtime environment. Possible values are:
*/ */
function detectRuntimeEnvironment() { function detectRuntimeEnvironment() {
// AWS Lambda environment // AWS Lambda environment
if ( if (typeof process !== "undefined" && process.env != null && process.env.AWS_LAMBDA_FUNCTION_NAME) {
typeof process !== 'undefined' &&
process.env != null &&
process.env.AWS_LAMBDA_FUNCTION_NAME
) {
return ENV_AWS_LAMBDA; return ENV_AWS_LAMBDA;
} }
// Google Cloud Functions environment // Google Cloud Functions environment
if ( if (typeof process !== "undefined" && process.env != null && process.env.FUNCTION_NAME) {
typeof process !== 'undefined' &&
process.env != null &&
process.env.FUNCTION_NAME
) {
return ENV_GOOGLE_FUNCTIONS; return ENV_GOOGLE_FUNCTIONS;
} }
// Node.js environment // Node.js environment
if ( if (typeof process !== "undefined" && process.versions != null && process.versions.node != null) {
typeof process !== 'undefined' &&
process.versions != null &&
process.versions.node != null
) {
// Electron environment // Electron environment
if (process.versions.electron != null) { if (process.versions.electron != null) {
return ENV_ELECTRON; return ENV_ELECTRON;
...@@ -63,20 +85,20 @@ function detectRuntimeEnvironment() { ...@@ -63,20 +85,20 @@ function detectRuntimeEnvironment() {
// Browser environment // Browser environment
if ( if (
typeof window !== 'undefined' && typeof window !== "undefined" &&
typeof window.document !== 'undefined' && typeof window.document !== "undefined" &&
typeof navigator !== 'undefined' && typeof navigator !== "undefined" &&
typeof navigator.userAgent === 'string' typeof navigator.userAgent === "string"
) { ) {
// Web Worker environment // Web Worker environment
if (typeof self === 'object' && typeof importScripts === 'function') { if (typeof self === "object" && typeof importScripts === "function") {
return ENV_WEB_WORKER; return ENV_WEB_WORKER;
} }
return ENV_BROWSER; return ENV_BROWSER;
} }
// Deno environment // Deno environment
if (typeof Deno !== 'undefined') { if (typeof Deno !== "undefined") {
return ENV_DENO; return ENV_DENO;
} }
...@@ -93,4 +115,5 @@ export { ...@@ -93,4 +115,5 @@ export {
ENV_WEB_WORKER, ENV_WEB_WORKER,
ENV_DENO, ENV_DENO,
ENV_UNKNOWN, ENV_UNKNOWN,
detectRuntimeEnvironment} detectRuntimeEnvironment,
\ No newline at end of file };
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
DOCUMENTATION_S3_PATH ?= s3://monsterjs.org/en/doc/$(COMPONENT_SLUG)/
\ No newline at end of file
{ {
"name": "monster", "name": "monster",
"version": "3.33.0", "version": "3.34.0",
"description": "monster", "description": "monster",
"repository": { "repository": {
"type": "git", "type": "git",
......
...@@ -7,7 +7,7 @@ describe('Monster', function () { ...@@ -7,7 +7,7 @@ describe('Monster', function () {
let monsterVersion let monsterVersion
/** don´t touch, replaced by make with package.json version */ /** 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(); let m = getMonsterVersion();
......
...@@ -2,19 +2,30 @@ ...@@ -2,19 +2,30 @@
## Introduction ## 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 ## Installation
npm install @schukai/monster To install MonsterJS, use the following command:
```bash
npm install @schukai/monster
```
## Usage ## Usage
Import MonsterJS into your project:
```javascript
import Monster from '@schukai/monster'; 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"}