painless-frontend-blen
v1.0.0
Published
A lightweight JavaScript library designed to make frontend development less painful.
Readme
🎨 PainlessFront
A tiny, powerful library to make the browser behave. No more long document.querySelector chains or confusing event listeners.
Installation
npm install painless-front-blenTop Features
🛠 DOM Made Easy
get('.box'): Short for querySelector.spawn('div', '.container', 'Hello!', { color: 'red' }): Create, style, and inject an element all in one line.change('#old', 'h1', 'New Title'): Swap an element's type while keeping its ID and Classes.
🖱 Interaction
onClick(el, fn): Easy clicking.onKey('Enter', fn): Global key listeners.drag(el): Make any element draggable instantly.
🔔 UI Helpers
alertPlus('Success!', 'green'): A beautiful, animated notification toast.paint(el, { background: 'blue' }): Apply multiple styles at once.
💾 Data & Logic
save('score', 100)/load('score'): Painless LocalStorage (handles JSON for you).each(list, fn): A safer loop that checks if your data is actually a list first.
Part of the Painless Ecosystem by purpleunicorn129.
