Wondering what’s next for npm?Check out our public roadmap! »

    @common-utilities/is-object
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.2 • Public • Published

    @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.

    Install

    npm i @common-utilities/is-object

    DownloadsWeekly Downloads

    2

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    6.21 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar