Socket
Socket
Sign inDemoInstall

@common-utilities/is-object

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@common-utilities/is-object

Basic implementations of common utility function that check if data is an object 🎛


Version published
Weekly downloads
16
increased by1500%
Maintainers
1
Weekly downloads
 
Created
Source

@common-utilities/is-object 🧰🎛

Typed with TypeScript npm version

IsObject is a common function for knowings whether data is of Object type. This function comes with isArray and isOfObjectTypes helper methods.


Install

yarn add @common-utilities/is-object -D

Usage

isArray

isArray(['test', 'test']) // true
isArray({ foo: 'test' }) // false

isOfObjectType

isOfObjectType(['test', 'test']) // true
isOfObjectType({ foo: 'test' }) // true
isOfObjectType(9) // false
isOfObjectType('string') // false
isOfObjectType(null) // false
isOfObjectType(undefined) // false

isObject

isObject(['test', 'test']) // false
isObject({ foo: 'test' }) // true

Common Utilities 🧰

No cruft. No bloat. No dependencies.

Simple, typed, functional, documented, and tested javascript utility functions.


View other common utilities.

Keywords

FAQs

Package last updated on 21 Mar 2021

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