@kikiutils/classes
v4.0.1
Published
A utility library providing various classes for advanced operations and manipulations.
Downloads
233
Maintainers
Readme
@kikiutils/classes
A utility library providing various classes for advanced operations and manipulations.
Features
- 📁 Path Class: Convenient manipulation and querying of file system paths with immutable methods.
- 🔢 PrecisionNumber Class: Accurate arithmetic operations with configurable decimal places and rounding using
Decimal.js
.
Environment Requirements
- Node.js version 18 or higher
Installation
Add dependency (example using pnpm).
pnpm add @kikiutils/classes
You can also use yarn, npm, or bun to add the dependency.
That's it! You're ready to use this package in your project. Check out the instructions for classes below ✨.
[!NOTE] When installing this package, not all required dependencies will be installed. If a function uses specific functionalities, you will need to install the corresponding dependencies manually.
For example, if there is a file that uses
precision-number.ts
, you will need to manually installdecimal.js
.
Classes
Detailed descriptions and examples can be found in the annotations within each class.
- Provides a comprehensive wrapper around Node.js
path
andfs
modules, andfs-extra
library. - Immutable methods that return new instances with modified values.
- Integration with
@kikiutils/fs-extra
for enhanced file system operations.
- Provides a comprehensive wrapper around Node.js
- Ensures accurate arithmetic operations with floating point numbers using the
Decimal.js
library. - Supports addition, subtraction, multiplication, and division with high precision.
- Includes methods for comparing numbers and checking states (e.g., finite, integer, zero).
- In-place modification methods and immutable methods for flexible value manipulation.
- Ensures accurate arithmetic operations with floating point numbers using the