riu.js
v1.0.1
Published
A lightweight and powerful JavaScript utility library for web development.
Maintainers
Readme
riu.js
Riu.js is a lightweight and powerful JavaScript utility library that provides a set of helper functions and classes to streamline your web development projects. It simplifies common tasks like DOM manipulation, state management, asynchronous operations, and more.
Installation
To use riu.js in your project, you can install it via npm:
npm i riu.jsDevelopment and Testing
This project was created using bun init. Bun is a fast all-in-one JavaScript runtime. The library is designed for browser environments.
To test the library's functionality:
Start the development server: Run the following command in your terminal. Bun will start a local server.
bun devOpen in browser: Open your web browser and navigate to the URL provided by the server (usually
http://localhost:3000).Check the console: Open the developer console (F12 or Ctrl+Shift+I) to see the output from the test suite defined in
test.ts.
Features
- DOM Helpers: Easy-to-use functions for selecting and creating DOM elements (
$,$$,create). - Event Management: Simplified event listeners and delegation (
on,delegate). - State Management: A simple yet powerful reactive state class (
State,state,effect). - UI Components: Out-of-the-box
toastandmodalcomponents. - Async Utilities: Helpers for Promises, retries, and timing (
wait,retry,Timer). - And much more! Includes utilities for debouncing, throttling, clipboard access, and random value generation.
