pardnchiu/RenderJS
[!NOTE] This README was generated by SKILL, get the ZH version from here.
EXTEND NATIVE JS PROTOTYPES, RENDER WITHOUT THE OVERHEAD
A JavaScript library with chainable DOM construction, a one-shot template engine, and native prototype extensions
Table of Contents
Features
npm i @pardnchiu/renderjs· Documentation
- Chainable DOM Construction — Build real DOM elements straight from tag-selector strings instead of verbose createElement chains.
- One-Shot Template Engine — Declarative directives render into the DOM in a single pass, with no virtual-DOM diffing or reactive watching, so you decide exactly when the view updates.
- Native Prototype Extensions — Dozens of chainable methods on String, Array, Object, Element, URL, and window cover element queries, requests, query strings, and cookies.
- Built-in Lazyload and SVG Inlining — One call enables IntersectionObserver-driven image lazy loading and automatic inlining of external SVG files.
- Zero-Dependency Single File — One minified file runs directly in the browser, installed via npm or a CDN script tag.
Architecture
graph TB
S["script copyright attribute"] --> G[Init Gate]
T[HTML Template] --> R[RJS Core]
G --> R
R --> D[Directive Parser]
D --> O[Rendered DOM]
P[Prototype Extensions] -.-> O
L[Lazyload / SVG Listener] -.-> O
License
This project is licensed under the MIT LICENSE.
Author
Just open an issue to share an idea.
©️ 2022 邱敬幃 Pardn Chiu