Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-number-even-or-odd

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-number-even-or-odd

Check if a number is even or odd

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4.7K
decreased by-59.27%
Maintainers
0
Weekly downloads
 
Created
Source

is-number-even-or-odd

You may or may not want to use it :)


List of Features

  • Check if the number is even or not
  • Check if the number is odd or not
  • Check if the number is even or odd

Download & Installation

$ npm i is-number-even-or-odd

Example Usage

const {isEven,isOdd,isEvenOrOdd} = require("is-number-even-or-odd")

// isEven -> returns true or false
const test1 = isEven(2)
// isOdd -> returns true or false
const test2 = isOdd(2)
// isEvenOrOdd -> returns "even", "odd" or "error"
const test3 = isEvenOrOdd(3)
const test4 = isEvenOrOdd('a')

console.log(test1) // true
console.log(test2) // false
console.log(test3) // odd
console.log(test4) // error

License

This project is licensed under the MIT License

Keywords

FAQs

Package last updated on 19 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc