New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@schukai/monster

Package Overview
Dependencies
Maintainers
1
Versions
333
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schukai/monster

Monster is a simple library for creating fast, robust and lightweight websites.

  • 2.0.1
  • npm
  • Socket score

Version published
Weekly downloads
698
increased by43.62%
Maintainers
1
Weekly downloads
 
Created
Source

Monster

Monster is perfectly suited for the creation of beautiful and fast
user interfaces and websites.

Monster relies on proven concepts mixed with many new JavaScript concepts such as classes, WeakRef, WeakMaps, proxies or the MutationObserver interface, just to name a few.

Monster integrates easily into your existing websites without taking over everything.

It is not the goal of Monster to pull in an entirely new abstraction with its own language, but to combine the existing techniques of HTML,
CSS and JavaScript in a meaningful way.

One design target is to reach the shiny sun with as little JavaScript as possible.

Monster was built with ES6 modules and uses import
and export.

For some functions, you need additional polyfills.

Documentation

To check out docs and examples, visit monsterjs.org/en/doc/monster/.

Installation

npm install @schukai/monster, yarn install @schukai/monster or pnpm install @schukai/monster

Usage

A simple example of the use of functionality from Monster. We create a small file index.mjs. The m in .mjs stands for module. In the example we want to make 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);
// ↦ 1

To integrate this function into a website it is recommended to use a bundler like esbuild.

esbuild index.mjs --outfile dist.js

We can now integrate that into our website.

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

Voila!

Polyfill

We do try to work around some browser bugs, but on the whole we don't use polyfills and feature detection.

However, many functions can be mapped via polyfill.io and thus the compatibility can be increased.

   <script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Array.isArray,Array.prototype.entries,Array.prototype.fill,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.keys,Array.prototype.lastIndexOf,Array.prototype.map,Array.prototype.reduce,Array.prototype.sort,ArrayBuffer,atob,DataView,document,DocumentFragment,Element,Event,globalThis,HTMLDocument,HTMLTemplateElement,JSON,Map,Math.log2,Number.isInteger,Object.assign,Object.defineProperty,Object.entries,Object.getOwnPropertyDescriptor,Object.getPrototypeOf,Object.keys,Promise,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,Set,String.prototype.endsWith,String.prototype.matchAll,String.prototype.padStart,String.prototype.startsWith,String.prototype.trim,Symbol,Symbol.iterator,WeakMap,WeakSet"
           crossorigin="anonymous"
           referrerpolicy="no-referrer"></script>

Questions

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

Issues

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

License

Copyright © 2022 schukai GmbH

AGPL

You can also purchase a commercial license.

Changelog

Detailed changes for each release are documented in the CHANGELOG.

Keywords

FAQs

Package last updated on 10 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc