# typecheck-utils

> A simple library utilizing the 'are-arrays' and 'are-objects' packages for advanced type validation in JavaScript.

Latest version **1.0.2** (published 2024-03-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install typecheck-utils
pnpm add typecheck-utils
yarn add typecheck-utils
bun add typecheck-utils
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-03-26 |
| First published | 2024-03-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 30 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ten |
| Maintainers | tangten |
| Keywords | typecheck, utils, arrays, objects |

## Links

- npm: https://www.npmjs.com/package/typecheck-utils
- Repository: https://github.com/tangten/typecheck-utils
- Homepage: https://github.com/tangten/typecheck-utils#readme
- Issues: https://github.com/tangten/typecheck-utils/issues
- npm.io page: https://npm.io/package/typecheck-utils

## Dependencies (30)

- [jest](https://npm.io/package/jest.md) ^29.7.0
- [husky](https://npm.io/package/husky.md) ^9.0.11
- [lerna](https://npm.io/package/lerna.md) ^8.1.2
- [ts-jest](https://npm.io/package/ts-jest.md) ^29.1.2
- [typedoc](https://npm.io/package/typedoc.md) ^0.25.12
- [audit-ci](https://npm.io/package/audit-ci.md) ^6.6.1
- [are-arrays](https://npm.io/package/are-arrays.md) ^1.0.0
- [typescript](https://npm.io/package/typescript.md) ^5.4.3
- [@types/jest](https://npm.io/package/@types/jest.md) ^29.5.12
- [are-objects](https://npm.io/package/are-objects.md) ^1.0.0
- [framer-motion](https://npm.io/package/framer-motion.md) ^11.0.20
- [jest-extended](https://npm.io/package/jest-extended.md) ^4.0.2
- [@sumup/foundry](https://npm.io/package/@sumup/foundry.md) ^7.1.1
- [@types/connect](https://npm.io/package/@types/connect.md) ^3.4.38
- [@changesets/cli](https://npm.io/package/@changesets/cli.md) ^2.27.1
- [@commitlint/cli](https://npm.io/package/@commitlint/cli.md) ^19.2.1
- [license-checker](https://npm.io/package/license-checker.md) ^25.0.1
- [@types/supertest](https://npm.io/package/@types/supertest.md) ^6.0.2
- [@headlessui/react](https://npm.io/package/@headlessui/react.md) ^1.7.18
- [@types/node-zopfli](https://npm.io/package/@types/node-zopfli.md) ^2.0.5
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^14.2.2
- [typedoc-plugin-markdown](https://npm.io/package/typedoc-plugin-markdown.md) ^3.17.1
- [@rollup/plugin-typescript](https://npm.io/package/@rollup/plugin-typescript.md) ^11.1.6
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^6.4.2
- [cz-conventional-changelog](https://npm.io/package/cz-conventional-changelog.md) ^3.3.0
- [typedoc-github-wiki-theme](https://npm.io/package/typedoc-github-wiki-theme.md) ^1.1.0
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^14.5.2
- [@changesets/changelog-github](https://npm.io/package/@changesets/changelog-github.md) ^0.5.0
- [@commitlint/config-conventional](https://npm.io/package/@commitlint/config-conventional.md) ^19.1.0
- [@commitlint/config-lerna-scopes](https://npm.io/package/@commitlint/config-lerna-scopes.md) ^19.0.0

## Recent versions

- 1.0.2 (latest) — 2024-03-26
- 1.0.1 — 2024-03-06
- 1.0.0 — 2024-03-02

## README

# TypeCheck Utils

A simple library utilizing the 'are-arrays' and 'are-objects' packages for advanced type validation in JavaScript.

## Installation
```
npm install typecheck-utils
```

## Usage
```
const typeCheckUtils = require('typecheck-utils');

const arrayOfObjects = [{ name: "Alice" }, { age: 30 }];
const nestedObject = { data: { key: "value" } };

console.log(typeCheckUtils.isArrayOfObjects(arrayOfObjects)); // true
console.log(typeCheckUtils.isNestedObject(nestedObject));     // true 
```

## Available Functions
- isArrayOfObjects(data)
  - Returns `true` if the provided data is an array where all elements are objects.
  - Returns `false` otherwise.
- isNestedObject(data)
  - Returns `true` if the provided data is an object containing at least one nested object within its values.
  - Returns `false` otherwise.

## Contributing
Contributions and suggestions are welcome! Please open an issue or submit a pull request.

## License
MIT

Let me know if you have any other content you'd like to include in the README!

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