Skip to content
Snippets Groups Projects
Select Git revision
  • e113777f52e33ff09f1b4a1eec04692205d8fa90
  • master default protected
  • 1.31
  • 4.37.2
  • 4.37.1
  • 4.37.0
  • 4.36.0
  • 4.35.0
  • 4.34.1
  • 4.34.0
  • 4.33.1
  • 4.33.0
  • 4.32.2
  • 4.32.1
  • 4.32.0
  • 4.31.0
  • 4.30.1
  • 4.30.0
  • 4.29.1
  • 4.29.0
  • 4.28.0
  • 4.27.0
  • 4.26.0
23 results

monster

Volker Schukai's avatar
Volker Schukai authored
Summary of changes
- Added validation for options in CustomElement constructor.
- Implemented a new mechanism to set customization values using a Map.
- Updated customization getter to return a new Map.

Changes
- In the constructor, validated if the options are correctly defined. This prevents potential issues down the line if the options are not an object.
- Introducing a Pathfinder that allows for setting deep customization values using a Map. This makes it easier to manipulate specific values without redefining the entire structure, preserving the original defaults.
- Updated the customization property getter to ensure it returns a Map instead of an object, thus aligning with the new customization mechanism.

These changes improve the robustness of the CustomElement, ensuring users have more flexibility while maintaining a safety net against misconfigurations.
e113777f
History

Monster

Monster is an ideal choice for building visually appealing and high-performance web interfaces and websites using modern JavaScript techniques.

By leveraging cutting-edge JavaScript features such as classes, WeakRef, WeakMaps, proxies, and the MutationObserver interface, Monster offers a blend of traditional methods and innovative web components.

Designed for seamless integration, Monster complements existing web projects without dominating the entire architecture.

Unlike solutions that introduce a new layer of abstraction and proprietary languages, Monster focuses on enhancing the native capabilities of HTML, CSS, and JavaScript for web development.

With a design goal to optimize performance and achieve stellar outcomes, Monster achieves this using minimal JavaScript code.

Monster is built with ES6 modules and uses the import and export statements.

For certain functions, additional polyfills may be required.

Documentation

To access our documentation and examples, visit monsterjs.org/.

Installation

Install Monster using npm, Yarn, or pnpm:

  • npm install @schukai/monster
  • yarn add @schukai/monster
  • pnpm add @schukai/monster

Usage

Here is a simple example of how to use Monster. We create a small file named index.mjs (where 'm' stands for module). In this example, we perform substitutions in a string:

import {Formatter} from '@schukai/monster/source/text/formatter.mjs';

const text = '${mykey${subkey}}';
let obj = {
    mykey2: "1",
    subkey: "2"
};

new Formatter(obj).format(text);
// Outputs: 1

To integrate this function into a website, it is recommended to use a bundler such as esbuild:

esbuild index.mjs --outfile=dist.js

You can now include it in your website:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Monster</title>
    <script src="dist.js"></script>
</head>
<body>

Voilà!

Polyfill

While we strive to work around some browser bugs, generally, we do not use polyfills or feature detection. However, many functions can be supplemented through polyfills, thus enhancing compatibility.

Questions

For questions and commercial support, please contact schukai GmbH. The issue list of this repository is exclusively for bug reports and feature requests.

Issues

Please ensure you read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

License

Copyright © 2024 schukai GmbH

Licensed under AGPL. Commercial licenses are also available.

Changelog

Detailed changes for each release are documented in the CHANGELOG.