DarkWiiPlayer/JS

A JavaScript micro-framework to make front-end easier

Note: This website is still work in progress!

Skooma.js

Skooma lets you generate DOM nodes in JavaScript.

Code Sample:

import {html} from 'skooma.js' let div = html.div([ html.h1('Hello, World!'), html.p('Here is some text', {class: ["class_a", "class_b"]}) html.button("Click Me!", { click: event => console.log(event) }) ])

Read more

Element

A helper function that adds many convenient features to classes for custom elements.

Code Sample:

import element from 'element.js' element(class MyElement extends HTMLElement { static attributes = { foo: true } fooChanged(oldFoo, newFoo) { console.log(`Foo changed from ${oldFoo} to ${newFoo}`) render() } $render() { /* ... */ } })

Read More

Listener

Like a normal object, except you can register callbacks for property changes.

Code Sample:

import listener from 'listener.js' const user = listener({name: "John Doe"}) user.listen('name', value => console.warn(`User name has changed to ${value}`))

Read More

Debounce

Debounces data like user input or events that can occur in a burst.

Code Sample:

import debounce from 'debounce.js' input.addEventListener("change", debounce(event => update(input.value)))

Read More