DEV Community

Cover image for Monster 1.31 released
Volker Schukai for schukai GmbH

Posted on

Monster 1.31 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 highlights are described here. The full functionality can be found in the documentation.

document and window ready

With jQuery there was always a simple call to check if the document was already loaded.

$( document ).ready(function() {
  // Handler for .ready() called.
});
Enter fullscreen mode Exit fullscreen mode

But with vanilla you always have to listen for events or query the document ready status. So we have that in our lib too there are two new promises.

domReady.then(()=>{
    // do something
}).catch(e => done(e));
Enter fullscreen mode Exit fullscreen mode

and ...

windowReady.then(()=>{
    // do something
}).catch(e => done(e));
Enter fullscreen mode Exit fullscreen mode

hope you enjoy it!

References

Top comments (0)