Skip to content

shaack/cm-web-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

400 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cm-web-modules

Zero-dependency ES6 module library for web development, used in production at chessmail.de.

Provides needed functionality with the smallest and cleanest amount of code possible. No build step required — modules are native ES6 imports used directly in browsers.

Installation

npm install cm-web-modules

Modules

Module Description
Audio Web Audio API playback with gain control, looping, and audio sprites
Cache Simple in-memory key-value cache with auto-clearing
Component Base classes for components with props, state, and declarative event binding
Cookie Read, write, and delete browser cookies
I18n Internationalization with fallback languages and placeholder substitution
Md5 Pure JavaScript MD5 hash implementation
MessageBroker Pub/Sub messaging with wildcard topic support
Notifications Web Notifications API wrapper
Observed Proxy-based reactive property observation
PromiseQueue Sequential promise execution queue
Stopwatch Timer with start, stop, reset, and tick callbacks
Svg SVG DOM creation and manipulation
Template Simple ${key} template rendering
Utils ArrayUtils, ColorUtils, CoreUtils, DateUtils, DomUtils, EncryptionUtils, HttpUtils, TextUtils

Usage

Import modules individually — there is no barrel export or bundling:

import {Audio} from "cm-web-modules/src/audio/Audio.js"
import {Sample} from "cm-web-modules/src/audio/Sample.js"
import {Observed} from "cm-web-modules/src/observed/Observed.js"

Testing

Browser-based only — open test/index.html in a browser. There is no CLI test runner.

License

MIT

About

Collection of clean and small ES6 modules for the web

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors