Forem

Cover image for Monster 1.27 released
Volker Schukai for schukai GmbH

Posted on

3 2

Monster 1.27 released

Today we released the latest edition of our Monster project. Monster is a collection of javascript classes that we need for daily work in our web projects.

Besides small helper functions and classes, it also provides useful functions to enable reactive programming.

Monster is available via jsdelivr and npm.

Only the changes are described here. The full functionality can be found in the documentation.

Updater

Until now the binding data-monster-bind of input controls worked via various events. With this release, the updater can now also perform updates manually.

<input id="id1" data-monster-bind="path:my.key">
Enter fullscreen mode Exit fullscreen mode
const obj = document.getElementById('id1');
obj.value="hello";

const updater = new Updater(document.querySelector('body'));
const subject = updater.getSubject();
// ↦ {}

updater.retrieve();
// ↦ {my: {key: "hello"}}

Enter fullscreen mode Exit fullscreen mode

findClosestByClass

The new helper function findClosestByClass summarizes the check to a class selector. The small helper function is used within monster to find elements.

Fixes

  • template: find themed templates

hope you enjoy it!

References

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Need a better mental model for async/await?

Check out this classic DEV post on the subject.

⭐️🎀 JavaScript Visualized: Promises & Async/Await

async await

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay