A simple utility function to check whether a number is odd or even.
To install this package, run the following command:
npm install @amanprasad/odd-even-checker
Usage
To use this package in your project, you can import the function and use it as follows:
Example
// Import the function
const isOddOrEven = require('@amanprasad/odd-even-checker');
// Check if a number is odd or even
const result = isOddOrEven(10);
console.log(result); // Output: "even"
isOddOrEven("not-a-number"); // Throws Error: "Input must be a number"
License
This project is licensed under the MIT License.
This `README.md` gives a clear overview of the package's functionality, installation instructions, usage examples, and error handling.