New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@itrocks/class-type

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@itrocks/class-type - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json

@@ -44,3 +44,3 @@ {

"types": "./esm/class-type.d.ts",
"version": "0.0.5"
"version": "0.0.6"
}

@@ -164,2 +164,19 @@ [![npm version](https://img.shields.io/npm/v/@itrocks/class-type?logo=npm)](https://www.npmjs.org/package/@itrocks/class-type)

### inherits
```ts
function inherits(type: Type, superType: Type): boolean
```
Checks if a class (or [Type](#type)) is derived from another class [class](#type), mimicking the behaviour of
[instanceof](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof),
but operating at the class level.
**Parameters:**
- `type`: The class whose inheritance chain will be checked
- `superType`: The parent class to check against.
**Returns:**
- `boolean`: Returns `true` if `type` is equal to or inherits from `superType`, otherwise `false`.
### isAnyFunction

@@ -166,0 +183,0 @@

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