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

tinspector

Package Overview
Dependencies
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinspector - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

4

lib/decorators.js

@@ -116,8 +116,6 @@ "use strict";

const Type = (() => {
class DynamicType {
class DynamicType extends parent {
}
return DynamicType;
})();
Object.setPrototypeOf(Type.prototype, parent.prototype);
Object.setPrototypeOf(Type, parent);
Reflect.decorate([generic.type(...params)], Type);

@@ -124,0 +122,0 @@ return Type;

@@ -0,4 +1,5 @@

import { Class } from "./types";
declare function useCache<K, P extends any[], R>(cache: Map<K, R>, fn: (...args: P) => R, getKey: (...args: P) => K): (...args: P) => R;
declare namespace metadata {
function isPrimitive(type: any): boolean;
function isCallback(type: Function): type is ((x: any) => Class[] | Class | string | string[]);
function isConstructor(value: any): boolean;

@@ -5,0 +6,0 @@ function isCustomClass(type: Function | Function[]): boolean;

@@ -23,19 +23,8 @@ "use strict";

(function (metadata) {
function isPrimitive(type) {
switch (type) {
case Boolean:
case String:
case Array:
case Number:
case Object:
case Date:
case Promise:
return true;
default:
return false;
}
function isCallback(type) {
return typeof type === "function" && !type.prototype;
}
metadata.isPrimitive = isPrimitive;
metadata.isCallback = isCallback;
function isConstructor(value) {
return isPrimitive(value) || ("" + value).indexOf("class") == 0;
return ("" + value).indexOf("class") == 0;
}

@@ -42,0 +31,0 @@ metadata.isConstructor = isConstructor;

@@ -211,3 +211,3 @@ "use strict";

const result = Array.isArray(override.type) || typeof override.type === "string" ? override.type :
helpers_1.metadata.isConstructor(override.type) ? override.type : override.type();
helpers_1.metadata.isCallback(override.type) ? override.type({}) : override.type;
return { type: result, target: override.target };

@@ -214,0 +214,0 @@ }

{
"name": "tinspector",
"version": "3.0.5",
"version": "3.0.6",
"description": "TypeScript type inspector",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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