New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@10xly/is-instance-of

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@10xly/is-instance-of

Check if something's an instance of something.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@10xly/is-instance-of

check if somethings an instance of something else. p]

Instawation

npm install @10xly/is-instance-of

Usage

const isInstanceOf = require("@10xly/is-instance-of")

class Animal {}
class Dog extends Animal {}
const pet = new Dog()

// Check by Constructor
isInstanceOf(pet, Dog) // true
isInstanceOf(pet, Animal) // true

// Check by Name (String)
isInstanceOf(pet, "Dog") // true

// Multiple options
isInstanceOf(pet, ["Cat", "Dog"]) // true

Why you might use this seriously

This is a version of is-instance-of by lamansky that resolves a vulnerability in lodash.set. However, it is a little overengineered, but this actually has a practical purpose. see the readme of is-instance-of for more info

Keywords

instance

FAQs

Package last updated on 15 Jan 2026

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