UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

65 lines (49 loc) โ€ข 7.57 kB
# Documentation Menu Welcome to the documentation! This is the central hub for exploring all available resources. Here, you can navigate through different sections of the project. Below are the main directories: --- ## ๐Ÿ“š Main Directories ### 1. **`basics/`** This folder contains the core scripts we have worked on so far. Each file is a module focused on specific functionality. - ๐Ÿ“ฆ **[Array](./basics/array.md)** โ€” A tiny utility for shuffling arrays using the Fisherโ€“Yates algorithm. - โฐ **[Clock](./basics/clock.md)** โ€” A versatile time utility module for calculating and formatting time durations. - ๐Ÿง  **[ObjFilter](./basics/objFilter.md)** โ€” Type detection, extension, and analysis made easy with simple and extensible type validation. * ๐Ÿงฎ **[objChecker](./basics/objChecker.md)** โ€” Utilities for counting keys in objects or arrays and for safely detecting plain JSON-compatible objects. - ๐Ÿ”ข **[SimpleMath](./basics/simpleMath.md)** โ€” A collection of simple math utilities for calculations like the Rule of Three and percentages. - โœ๏ธ **[Text](./basics/text.md)** โ€” A utility for transforming text into title case formats, with multiple options for capitalization. - ๐Ÿ”„ **[AsyncReplace](./basics/asyncReplace.md)** โ€” Asynchronously replaces matches in a string using a regex and an async function. - ๐Ÿ–ผ๏ธ **[Html](./basics/html.md)** โ€” Utilities for handling DOM element interactions like collision detection and basic element manipulation. - ๐Ÿ“บ **[FullScreen](./basics/fullScreen.md)** โ€” A complete fullscreen API manager with detection, event handling, and cross-browser compatibility. - ๐Ÿงฑ **[Collision](./basics/collision.md)** โ€” Full-featured rectangle collision detection system with directional analysis, depth calculation, and center offset metrics. ### 2. **`libs/`** - ๐Ÿ—‚๏ธ **[TinyPromiseQueue](./libs/TinyPromiseQueue.md)** โ€” A class that allows sequential execution of asynchronous tasks, supporting task delays, cancellation, and queue management. - ๐Ÿ… **[TinyLevelUp](./libs/TinyLevelUp.md)** โ€” A class to manage user level-up logic based on experience points, providing methods for experience validation, addition, removal, and calculation. - ๐ŸŽจ **[ColorSafeStringify](./libs/ColorSafeStringify.md)** โ€” A utility for applying customizable ANSI colors to JSON strings in terminal outputs, supporting presets and fine-grained type-based highlighting. - ๐Ÿšฆ **[TinyRateLimiter](./libs/TinyRateLimiter.md)** โ€” A flexible per-user rate limiter supporting time windows, hit caps, and automatic cleanup of inactive users. - ๐Ÿ”” **[TinyNotifyCenter](./libs/TinyNotifyCenter.md)** โ€” A dynamic notification center class to display, manage, and interact with notifications, supporting avatars, clickable items, HTML/text modes, and clean UI controls. - ๐Ÿž **[TinyToastNotify](./libs/TinyToastNotify.md)** โ€” A lightweight toast notification system supporting positioning, timing customization, avatars, click actions, and fade-out animations. - ๐Ÿ“ฅ **[TinyDragDropDetector](./libs/TinyDragDropDetector.md)** โ€” A lightweight drag-and-drop detector for files, handling the full drag lifecycle (`enter`, `over`, `leave`, `drop`) with CSS hover management and safe event handling on any DOM element or the full page. - ๐Ÿ“‚ **[TinyUploadClicker](./libs/TinyUploadClicker.md)** โ€” A minimal utility to bind any clickable element to a hidden file input, offering full control over styling, behavior, and upload event hooks. - ๐Ÿงฒ **[TinyDragger](./libs/TinyDragger.md)** โ€” A flexible drag-and-drop manager with collision detection, jail constraints, vibration feedback, visual proxies, revert-on-drop, and full custom event support. - ๐Ÿ•’ **[TinyDomReadyManager](./libs/TinyDomReadyManager.md)** โ€” A readiness manager for DOM and async conditions, supporting prioritized callbacks, custom filters, and event-based or promise-based bootstrapping. - ๐Ÿ“ฃ **[TinyNotifications](./libs/TinyNotifications.md)** โ€” A browser notification utility with sound support, permission management, truncation logic, default icons, and enforced validation to ensure safe and predictable usage. - ๐Ÿงฑ **[TinyHtml](./libs/TinyHtml.md)** โ€” A minimalist DOM utility class that offers jQuery-like methods in pure JavaScript for querying, styling, traversing, event handling, collision detection, and visibility logic โ€” all in a lightweight and chainable interface. - ๐ŸŒ€ **[TinySmartScroller](./libs/TinySmartScroller.md)** โ€” A smart scroll monitor that detects user scroll behavior, visibility changes, element sizes, and automatically handles scroll preservation, bottom detection, debounce, and more. - ๐Ÿ“‹ **[TinyClipboard](./libs/TinyClipboard.md)** โ€” A clipboard management utility with support for modern APIs, legacy fallbacks, and custom copy handlers for text and blobs, plus flexible read operations and clipboard item filtering. - ๐Ÿฎ **[UltraRandomMsgGen](./libs/UltraRandomMsgGen.md)** โ€” A whimsical random message generator using grammar templates, word sets, emojis, and chaotic modes to craft playful text outputs. - โœ๏ธ **[TinyTextRangeEditor](./libs/TinyTextRangeEditor.md)** โ€” An flexible text range manipulation utility for `input` and `textarea` elements. Supports selection, cursor control, tag insertion, attribute handling, inline editing, formatting, and advanced wrap/toggle logic with optional spacing auto-completion. - โณ **[TinyTimeout](./libs/TinyTimeout.md)** โ€” A dynamic timeout and delay manager with support for usage-based throttling, delay scaling, configurable decay intervals, and asynchronous polling for conditions. - ๐ŸŒˆ **[TinyColorConverter](./libs/TinyColorConverter.md)** โ€” A complete color conversion toolkit supporting hex, RGB(A), HSL(A), and integer formats, with smooth gradient generation, color parsing, and multi-format output conversion. - ๐Ÿ“ก **[TinyEvents](./libs/TinyEvents.md)** โ€” A lightweight and dependency-free event emitter inspired by Node.js, supporting persistent and one-time listeners, listener inspection, and max listener limits. - ๐Ÿ“ฆ **[TinyLocalStorage](./libs/TinyLocalStorage.md)** โ€” A tiny wrapper for `localStorage` with full support for objects, arrays, `Map`, `Set`, and typed value helpers like string, number, and boolean. - ๐Ÿ–ผ๏ธ **[TinyIframeEvents](./libs/TinyIframeEvents.md)** โ€” A structured `postMessage`-based event router for secure and reliable communication between a parent window and its embedded iframe. Supports directional filtering, origin enforcement, payload transport, and listener lifecycle. - ๐ŸชŸ **[TinyNewWinEvents](./libs/TinyNewWinEvents.md)** โ€” A smart, route-based `postMessage` system for structured communication between a main window and a popup (`window.open`). Includes queueing, origin enforcement, and lifecycle tracking. - โœจ **[TinyTextarea](./libs/TinyTextarea.md)** โ€” A minimal auto-expanding `<textarea>` manager with configurable row limits, extra height padding, and real-time resize/input event hooks. ### 3. **`fileManager/`** * ๐Ÿ“ **[Main](./fileManager/main.md)** โ€” A Node.js file/directory utility module with support for JSON, backups, renaming, size analysis, and more. --- ## ๐Ÿš€ Usage To get started, navigate to the appropriate directory and explore the files listed. Each script includes detailed documentation on how to use the respective functionality. --- ## ๐Ÿ“‘ Contributing Feel free to suggest changes, improvements, or additional features. You can fork the repository and submit a pull request!