<div align="center">

<img src="https://github.com/Bejibun-Framework/bejibun/blob/master/public/images/bejibun.png?raw=true" width="150" alt="Bejibun" />

![GitHub top language](https://img.shields.io/github/languages/top/Bejibun-Framework/bejibun-utils)
![NPM Downloads](https://img.shields.io/npm/d18m/%40bejibun%2Futils)
![GitHub issues](https://img.shields.io/github/issues/Bejibun-Framework/bejibun-utils)
![GitHub](https://img.shields.io/github/license/Bejibun-Framework/bejibun-utils)
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Bejibun-Framework/bejibun-utils?display_name=tag&include_prereleases)

</div>

# Utils of Bejibun
Any utils for Bejibun Framework.

## Usage

### Installation
Install the package.

```bash
# Using Bun
bun add @bejibun/utils

# Using Bejibun
bun ace install @bejibun/utils
```

### Available Helpers
List of available functions.
- `isEmpty()` Check if variable is empty
- `isNotEmpty()` Check if variable is not empty
- `defineValue()` Define value if empty use default value
- `ask()` Command prompt
- `isCommandExists()` Check if command available
- `isModuleExists()` Check if module installed
  
#### Enum
- `Enum.setEnums(enums).getKey()` Get key by value.
- `Enum.setEnums(enums).getValue()` Get value by key.
- `Enum.setEnums(enums).toArray()` Convert enums into an array.
- `Enum.setEnums(enums).hasValue()` Checks if the enum contains the specified value.
- `Enum.setEnums(enums).hasKey()` Checks if the enum contains the specified key.
  
#### Str
- `Str.toLowerCase()` Convert string to lower
- `Str.toPascalCase()` Convert string to pascal case
- `Str.toUpperCase()` Convert string to upper
- `Str.random()` Generate random string
- `Str.ipToFileName()` Convert IP to correct filename
  
#### Luxon
- `Luxon.datetime` -> DateTime
- `Luxon.duration` -> Duration
- `Luxon.interval` -> Interval
  
#### Object
- `Object.serialize()` Convert values into actual value
- `Object.parseFormData()` Convert form data into object and auto serialize

## ☕ Support / Donate

If you find this project helpful and want to support it:

[![Donate](https://img.shields.io/badge/Donate-Support%20Me-orange?style=for-the-badge)](https://donate.bejibun.com)

Or you can buy this `$BJBN (Bejibun)` tokens [here](https://pump.fun/coin/CQhbNnCGKfDaKXt8uE61i5DrBYJV7NPsCDD9vQgypump).