npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

is-check-mahmud

v1.2.3

Published

A package to check various data types like number, integer, float, NaN, finite, infinity, odd, even, array, object, string, date, binary, URL, and file types like PNG, SVG, MP3, MP4, etc.

Readme

is-check-mahmud

A lightweight utility package for type checking in JavaScript & Node.js

npm
license
downloads


📌 Features

✔ Check data types (number, string, array, object, null, undefined, etc.)
✔ Check if a value is odd/even
✔ Check if a string is URL, binary, SVG, PNG, JPEG, MP3, MP4, WebP, etc.
✔ Detect file type from a URL or file path
✔ Works in both Node.js & Browser


📥 Installation

Using npm:

npm install is-check-mahmud

Using yarn:

yarn add  is-check-mahmud

📌 Import The package

const isCheck = require("is-check-mahmud");

📌 Check basic data types

console.log(isCheck.isNumber(123));      // true

console.log(check.isInteger(10)); // true
console.log(check.isFloat(10.5)); // true
console.log(check.isNaNValue(NaN)); // true
console.log(check.isFiniteNumber(100)); // true
console.log(check.isFiniteNumber(Infinity)); // false
console.log(check.isInfinity(Infinity)); // true
console.log(check.isInfinity(-Infinity)); // true
console.log(isCheck.isString("Hello"));  // true
console.log(isCheck.isArray([1, 2, 3])); // true
console.log(isCheck.isObject({ key: "value" })); // true
console.log(isCheck.isNull(null));       // true
console.log(isCheck.isUndefined(undefined)); // true

📌 Check even/odd numbers

console.log(isCheck.isEven(10)); // true
console.log(isCheck.isOdd(7));   // true

📌 Check URLS and File types

console.log(isCheck.isURL("https://example.com")); // true
console.log(isCheck.isBinary("1010101"));         // true
console.log(isCheck.isSVG("<svg></svg>"));         // true
console.log(isCheck.isPNG("image.png"));          // true
console.log(isCheck.isJPEG("image.jpeg"));        // true
console.log(isCheck.isMP3("audio.mp3"));          // true
console.log(isCheck.isMP4("video.mp4"));          // true
console.log(isCheck.isWebP("image.webp"));        // true

📌 Check URLS and File types

console.log(isCheck.getFileType("https://example.com/image.png")); // "png"
console.log(isCheck.getFileType("C:/Users/user/music.mp3")); // "mp3"

API Methods

| Method | Description | Example Usage | |-----------------------|------------------------------------------------------------------|----------------------------------------------------------| | isNumber(value) | Check if the value is a number | isCheck.isNumber(123) // true | | isInteger(value) | Check if the value is a integer | isCheck.isInteger(123) // true | | isFloat(value) | Check if the value is a floating point number | isCheck.isFloat(10.5) // true | | isNaNValue(value) | Check if the value is a NaN | isCheck.isNaNValue(NaN) // true | | isFiniteNumber(value) | Check if the value is a Infinite number | isCheck.isFiniteNumber(100) // true | | isInfinity(value) | Check if the value is a Infinity or -Infinity | isCheck.isInfinity(Infinity) // true | | isString(value) | Check if the value is a string | isCheck.isString("Hello") // true | | isArray(value) | Check if the value is an array | isCheck.isArray([1, 2, 3]) // true | | isObject(value) | Check if the value is an object | isCheck.isObject({key: "value"}) // true | | isNull(value) | Check if the value is null | isCheck.isNull(null) // true | | isUndefined(value) | Check if the value is undefined | isCheck.isUndefined(undefined) // true | | isEven(number) | Check if the number is even | isCheck.isEven(10) // true | | isOdd(number) | Check if the number is odd | isCheck.isOdd(7) // true | | isURL(value) | Check if the value is a valid URL | isCheck.isURL("https://example.com") // true | | isBinary(value) | Check if the value is binary | isCheck.isBinary("1010101") // true | | isSVG(value) | Check if the value is an SVG | isCheck.isSVG("<svg></svg>") // true | | isPNG(value) | Check if the value is a PNG image | isCheck.isPNG("image.png") // true | | isJPEG(value) | Check if the value is a JPEG image | isCheck.isJPEG("image.jpeg") // true | | isMP3(value) | Check if the value is an MP3 file | isCheck.isMP3("audio.mp3") // true | | isMP4(value) | Check if the value is an MP4 video | isCheck.isMP4("video.mp4") // true | | isWebP(value) | Check if the value is a WebP image | isCheck.isWebP("image.webp") // true | | getFileType(value) | Get file type from URL or file path | isCheck.getFileType("https://example.com/image.png") // "png" |