# tm-is

> JavaScript basic 'is' functions.

Latest version **0.3.0** (published 2024-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install tm-is
pnpm add tm-is
yarn add tm-is
bun add tm-is
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2024-12-28 |
| First published | 2021-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Roman Burunkov |
| Maintainers | romon2002 |
| Keywords | is, isObject, isFunction, isFunc, isEmpty, isUndefined, isEqual |

## Links

- npm: https://www.npmjs.com/package/tm-is
- Repository: https://github.com/RomanBurunkov/tm-is
- Homepage: https://github.com/RomanBurunkov/tm-is#readme
- Issues: https://github.com/RomanBurunkov/tm-is/issues
- npm.io page: https://npm.io/package/tm-is

## Recent versions

- 0.3.0 (latest) — 2024-12-28
- 0.2.0 — 2021-09-09
- 0.1.0 — 2021-08-02
- 0.0.3 — 2021-04-27
- 0.0.2 — 2021-03-27
- 0.0.1 — 2021-03-27

## README

# tm-is

[![npm](https://img.shields.io/npm/v/tm-is.svg)](https://www.npmjs.org/package/tm-is)
[![codecov](https://codecov.io/gh/RomanBurunkov/tm-is/branch/main/graph/badge.svg?token=64HIR1FX0Z)](https://codecov.io/gh/RomanBurunkov/tm-is)

JavaScript basic 'is' functions for Node.

## Installation

```
npm i tm-is
```

## Description

Module provides a bunch of functions which return true or false.
All functions support zero or more arguments.
If several arguments passed, all of them should meet function conditions.
Conditions for each function described in the Functions section.

E.g.

```js
  isObject({}); // true
  isObject({}, {}); // true
  isObject({}, 'str'); // false, since not all arguments are objects.
```

## Functions

- `isEmpty`: Returns true if passed argument is null, empty string or undefined.
- `isObject`/`isObj`: Returns true if passed argument is an object except null.
- `isFunction`/`isFunc`: Returns true if passed argument is a function.
- `isUndefined`/`isUndef`: Returns true if passed argument is undefined.
- `isEqualArrays`/`isEqArr`: Returns true if passed arguments are equal arrays.
- `isValidDate`/`isDate`: Returns true if passed arguments are valid date string or number.

## Examples

```js
const { isObject, isFunction } = require('tm-is');

console.log(isObject({})); // true
console.log(isObject(null)); // false
console.log(isObject('string')); // false

console.log(isFunction('null')); // false
console.log(isFunction('string')); // false
console.log(isFunction(() => { })); // true

console.log(isValidDate(null)); // false
console.log(isValidDate('qwertyuiop')); // false
console.log(isValidDate('2024-12-27')); // true

```

---
_Source: https://npm.io/package/tm-is · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
