next-lesscode
v4.5.6
Published
This is a package to encapsulate irritating code into functions, regex, and many more.
Downloads
166
Readme
next-lesscode Package
next-lesscode Package
next-lesscode is an npm package built on Next.js that contains reusable functions, constants, and regular expressions for various tasks. Additionally, it provides components (planned for future development) that can be utilized in your Next.js projects.
Functions
getDeviceType()
: Determines the type of device (mobile, tablet, or PC).getError(error)
: Retrieves the first error encountered in a nested error object.errObj(errorCondition, message)
: Creates an error object based on the provided conditions and message.
Regular Expressions
emailRegex
: Regular expression for validating email addresses.usernameRegex
: Regular expression for validating usernames.
Constants
months
: An array of month names and abbreviations.genres
: An array of music genres.countries
: An array of country objects with IDs, names, and ISO2 codes.
Contributing
We welcome contributions from the community. To contribute to next-lesscode, please follow these steps:
- Fork the repository on GitHub.
- Clone your forked repository to your local machine.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive commit messages.
- Push your changes to your GitHub repository.
- Submit a pull request to the original repository with a clear description of your changes.