@amanprasad/odd-even-checker

1.0.1 • Public • Published

@amanprasad/odd-even-checker

A simple utility function to check whether a number is odd or even.

Installation

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.

Readme

Keywords

Package Sidebar

Install

npm i @amanprasad/odd-even-checker

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.06 kB

Total Files

4

Last publish

Collaborators

  • amanprasad