Skip to content

Anton293/UPToolkit.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UPToolkit.js (UP.js) 📦

Welcome to UP.js - a versatile JavaScript utility library designed to make DOM manipulation, text processing, and file handling easier! 🎉

Table of Contents 📚

Installation 🛠️

Simply include the UP.js script in your HTML file:

<script src="path/to/UP.js"></script>

Or import it in your JavaScript project:

import UP from 'path/to/UP.js';

Usage 🚀

Element Manipulation 🌐

Manipulate DOM elements with a fluent interface:

// Select an element and chain methods to set multiple properties
let myElement = new UP("#myElement");

myElement.setC("red")
         .setBg("yellow")
         .setD("block")
         .setW("100px")
         .setH("100px")
         .setHTML("Hello World!");

Text Utilities ✂️

Process text with ease:

// Extract text after a specific character
let result = UP.text.beforeDate("example.txt", '.'); // Output: "txt"

// Get text between two characters
let betweenText = UP.text.getText("Hello [world]!", '[', ']'); // Output: "world"

// Split text using multiple delimiters
let array = UP.text.multiArr("apple,orange|banana&grape", ',', '|', '&'); 
// Output: ["apple", "orange", "banana", "grape"]

URL Utilities 🌍

Work with URL parameters and hashes:

// Get the value of a query parameter
let value = UP.url.search("key"); // Output: value of 'key' in the URL

// Get the hash from the URL
let hash = UP.url.hesh(true); // Output: #hashValue

File Loading 📂

Load and process files easily:

// Load a JSON file
let data = UP.fill.view("path/to/file.json", 'json'); 

// Load and auto-detect file type
let autoData = UP.fill.viewAutoType("path/to/file.json"); 

License 📜

This project is licensed under the MIT License. See the LICENSE file for details.


Feel free to contribute, raise issues, or share your thoughts! Happy coding! 💻🚀


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published