efun
v1.3.0
Published
A collection of extra utility functions to enhance your JavaScript projects.
Maintainers
Readme
Efun - Extra Utility Functions
efun is a collection of utility functions designed to enhance your JavaScript projects. It provides a variety of functionalities for common tasks, making your code more concise and efficient.
Features
- Math Functions: Perform basic arithmetic operations (addition, subtraction, multiplication, division), exponentiation, square root, trigonometric functions, and logarithms.
- String Manipulation Functions: Capitalize strings in various styles (first letter, all words, etc.) and reverse strings.
- Array Manipulation Functions: Reverse the order of elements in an array.
Installation
Install the efun package using npm or yarn:
npm install efunor
yarn add efunUsage
1. Import the entire package:
import Efun from 'efun';2. Use individual functions:
const sum = Efun.aum(5, 3); // 8
const reversedString = Efun.reverseString('hello'); // olleh
const capitalizedWords = Efun.capitalizeFirstLetterOfEachWord('hello world'); // Hello World3. Alternatively, import specific functions (optional):
import { reverseArray } from 'efun';
import { capitalizeString } from 'efun';
const reversedArray = reverseArray([1, 2, 3]); // [3, 2, 1]
const capitalizedString = capitalizeString('javascript'); // JavascriptNote: When importing specific functions, you'll need to import each function you want to use from the efun package.
Contributing
We welcome contributions from the community! To contribute to efun view CONTRIBUTING and , follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes and commit them:
git commit -m "Add your commit message" - Push to the branch:
git push origin feature/your-feature-name - Open a pull request.
Please make sure your contributions align with our code of conduct.
License
This project is licensed under the Apache-2.0 License.
