|
9 | 9 |
|
10 | 10 | ## About ✍️
|
11 | 11 |
|
12 |
| -- This Is A JavaScript Library To Make Your Work Easier/Faster,<br /> |
13 |
| - You Can See Functionalty.js Website From Here |
| 12 | +- This Is A Php Library To Make Your Work Easier/Faster,<br /> |
| 13 | + You Can See Functionalty.php Website From Here |
14 | 14 | - Project Created In 15 / 6 / 2022
|
| 15 | + |
| 16 | +## Installation 📦 |
| 17 | + |
| 18 | + - Using Composer |
| 19 | + ```bash |
| 20 | + composer require functionality-library/functionality.php |
| 21 | + ``` |
| 22 | + - Now You Can Use Functionality.php Library In Your Project |
| 23 | + - Example |
| 24 | + ```php |
| 25 | + require_once 'vendor/autoload.php'; |
| 26 | + use Functionality\FunctionalityPhp\Functionality; |
| 27 | + |
| 28 | + echo Functionality::randomColor(); // Random Color |
| 29 | + ``` |
| 30 | +## Usage 📚 |
| 31 | +- Randoms functions |
| 32 | + - `Functionality::randomColor()` - Generate Random Color |
| 33 | + - `Functionality::randomBoolean()` - Generate Random Boolean |
| 34 | + - `Functionality::randomNumber()` - Generate Random Number |
| 35 | + - `Functionality::randomString()` - Generate Random String |
| 36 | + - `Functionality::randomHsl()` - Generate Random Hsl Color |
| 37 | + - `Functionality::randomHexColor()` - Generate Random Hex Color |
| 38 | +- Numbers functions |
| 39 | + - `Functionality::getAvg(float $a, float $b)` - Get Average butween two numbers |
| 40 | + - `Functionality::isEven(float $number)` - Check If Number Is Even |
| 41 | + - `Functionality::isOdd(float $number)` - Check If Number Is Odd |
| 42 | + - `Functionality::isPrime(int $number)` - Check If Number Is Prime |
| 43 | + - `Functionality::reverseNumber(float $number)` - Reverse a number (e.g. 12345 -> 54321) |
| 44 | +- Strings functions |
| 45 | + - `Functionality::isPalindrome(string $string)` - Check If String Is Palindrome |
| 46 | + - `Functionality::capitalize(string $string)` - Capitalize First Letter Of Words In String |
| 47 | + - `Functionality::reverseString(string $string)` - Reverse a string (e.g. abcdef -> fedcba) |
| 48 | +- Arrays functions |
| 49 | + - `Functionality::filter(array $array, callable $callable)` - Filter Array By Callable |
| 50 | + - `Functionality::getFactors(int $number)` - Get Factors Of Number |
| 51 | + - `Functionality::maxArray(array $array)` - Get Max Value Of Array |
| 52 | + - `Functionality::minArray(array $array)` - Get Min Value Of Array |
| 53 | + - `Functionality::sumArray(array $array)` - Get Sum Of Array |
| 54 | + - `Functionality::randomElementFromArray(array $array)` - Get Random Element From Array |
| 55 | + - `Functionality::removeDuplicatesFromArray(array $array)` - Remove Duplicates From Array |
| 56 | + - `Functionality::shuffle(array $array)` - Sort Array Randomly |
| 57 | +
|
| 58 | +## To Get Started Contributing ☕ |
| 59 | +
|
| 60 | +- First Clone The Repository |
| 61 | +
|
| 62 | + ```bash |
| 63 | + git clone https://github.com/functionality-library/functionality.php.git |
| 64 | + ``` |
| 65 | + |
| 66 | +- Then Install Packages |
| 67 | + |
| 68 | + ```bash |
| 69 | + composer install |
| 70 | + ``` |
| 71 | + |
| 72 | +- Run Tests using `phpunit` |
| 73 | + |
| 74 | + ```bash |
| 75 | + composer run-script test |
| 76 | + ``` |
| 77 | + |
| 78 | +- Feel Free To Add What You Want! |
| 79 | +- If there is any issue, please open an issue on GitHub |
| 80 | +- If you have any suggestion, please open an issue on GitHub |
| 81 | +- If you have any question, please open an issue on GitHub |
0 commit comments