Skip to content

Bejibun-Framework/bejibun-utils

Repository files navigation

Bejibun

GitHub top language NPM Downloads GitHub issues GitHub GitHub release (latest by date including pre-releases)

Utils of Bejibun

Any utils for Bejibun Framework.

Usage

Installation

Install the package.

# 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

Or you can buy this $BJBN (Bejibun) tokens here.

About

Any utils for Bejibun Framework

Topics

Resources

License

Stars

5 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors