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

typecheck-utils

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typecheck-utils

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

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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!

Keywords

FAQs

Package last updated on 26 Mar 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