Socket
Socket
Sign inDemoInstall

@deepkit/core

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deepkit/core - npm Package Compare versions

Comparing version 1.0.1-alpha.63 to 1.0.1-alpha.65

2

dist/cjs/src/compiler.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CompilerContext = void 0;
var __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"'];
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"'];
/*

@@ -6,0 +6,0 @@ * Deepkit Framework

@@ -336,4 +336,8 @@ /**

export declare function isIterable(value: any): boolean;
/**
* Returns __filename, works in both cjs and esm.
*/
export declare function getCurrentFileName(): string;
export declare type __ΩClassType = any[];
export declare type __ΩAbstractClassType = any[];
export declare type __ΩExtractClassType = any[];

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

exports.getObjectKeysSize = exports.humanBytes = exports.deletePathValue = exports.setPathValue = exports.getPathValue = exports.time = exports.collectForMicrotask = exports.mergeStack = exports.createStack = exports.mergePromiseStack = exports.asyncOperation = exports.appendObject = exports.prependObjectKeys = exports.average = exports.last = exports.first = exports.lastKey = exports.firstKey = exports.size = exports.empty = exports.copy = exports.sleep = exports.indexOf = exports.isString = exports.isInteger = exports.isNumeric = exports.isNumber = exports.isSet = exports.isUndefined = exports.isNull = exports.isArray = exports.isObject = exports.isClass = exports.isPromise = exports.isAsyncFunction = exports.isFunction = exports.prettyPrintObject = exports.changeClass = exports.stringifyValueWithType = exports.isClassInstance = exports.getClassTypeFromInstance = exports.isPlainObject = exports.identifyType = exports.applyDefaults = exports.getClassPropertyName = exports.getClassName = exports.__ΩExtractClassType = exports.__ΩAbstractClassType = exports.__ΩClassType = exports.CustomError = void 0;
exports.isIterable = exports.createDynamicClass = exports.inDebugMode = exports.getParentClass = exports.isPrototypeOfBase = exports.isConstructable = void 0;
exports.getCurrentFileName = exports.isIterable = exports.createDynamicClass = exports.inDebugMode = exports.getParentClass = exports.isPrototypeOfBase = exports.isConstructable = void 0;
const __ΩPropertyKey = ['P&\'+J'];

@@ -755,2 +755,19 @@ const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-M'];

isIterable.__type = ['value', 'isIterable', 'P"2!)/"'];
/**
* Returns __filename, works in both cjs and esm.
*/
function getCurrentFileName() {
const e = new Error;
const initiator = e.stack.split('\n').slice(2, 3)[0];
let path = /(?<path>[^(\s]+):[0-9]+:[0-9]+/.exec(initiator).groups.path;
if (path.indexOf('file') >= 0) {
path = new URL(path).pathname;
}
if (path[0] === '/' && process.platform === 'win32') {
path = path.slice(1);
}
return path;
}
exports.getCurrentFileName = getCurrentFileName;
getCurrentFileName.__type = ['getCurrentFileName', 'P&/!'];
//# sourceMappingURL=core.js.map

@@ -14,4 +14,4 @@ "use strict";

const array_1 = require("./array");
var __ΩAsyncSubscriber = ['T', 'event', '', 'b!Pe"!2"P$`$J/#'];
var __ΩAsyncEventSubscription = ['', 'unsubscribe', 'PP$/!4"M'];
const __ΩAsyncSubscriber = ['T', 'event', '', 'b!Pe"!2"P$`$J/#'];
const __ΩAsyncEventSubscription = ['', 'unsubscribe', 'PP$/!4"M'];
exports.__ΩAsyncEventSubscription = __ΩAsyncEventSubscription;

@@ -18,0 +18,0 @@ let asyncId = 0;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.eachPair = exports.each = exports.eachKey = void 0;
var __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'b!P."4#8e"!4$M'];
var __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'b!P."4#e"!4$M'];
var __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'b!"c"Pe"!o#"e""o$"J'];
var __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,M'];
var __ΩArrayLike = ['T', 'length', 'b!P\'4"9\'e"!LM'];
var __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'b!Pe"!o""Pe#!o#"1$M'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'b!P."4#8e"!4$M'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'b!P."4#e"!4$M'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'b!"c"Pe"!o#"e""o$"J'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,M'];
const __ΩArrayLike = ['T', 'length', 'b!P\'4"9\'e"!LM'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'b!Pe"!o""Pe#!o#"1$M'];
eachKey.__type = [() => __ΩArrayLike, 'object', () => __ΩIterableIterator, 'eachKey', 'P"o!"2"\'o#"/$'];

@@ -11,0 +11,0 @@ eachKey.__type = ['object', () => __ΩIterableIterator, 'eachKey', 'P"2!&o""/#'];

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

(0, globals_1.test)('getEnumLabels numbered index', () => {
var __ΩMyEnum = ['first', 'second', 'third', 'PC!C"C#B'];
const __ΩMyEnum = ['first', 'second', 'third', 'PC!C"C#B'];
let MyEnum;

@@ -18,3 +18,3 @@ (function (MyEnum) {

(0, globals_1.test)('getEnumLabels custom numbered index', () => {
var __ΩMyEnum = ['first', () => 400, 'second', () => 500, 'third', () => 600, 'PC!>"C#>$C%>&B'];
const __ΩMyEnum = ['first', () => 400, 'second', () => 500, 'third', () => 600, 'PC!>"C#>$C%>&B'];
let MyEnum;

@@ -30,3 +30,3 @@ (function (MyEnum) {

(0, globals_1.test)('getEnumLabels partial custom numbered index', () => {
var __ΩMyEnum = ['first', 'second', () => 500, 'third', 'PC!C">#C$B'];
const __ΩMyEnum = ['first', 'second', () => 500, 'third', 'PC!C">#C$B'];
let MyEnum;

@@ -42,3 +42,3 @@ (function (MyEnum) {

(0, globals_1.test)('getEnumLabels string index', () => {
var __ΩMyEnum = ['first', () => "my_first", 'second', () => "my_second", 'third', () => "my_third", 'PC!>"C#>$C%>&B'];
const __ΩMyEnum = ['first', () => "my_first", 'second', () => "my_second", 'third', () => "my_third", 'PC!>"C#>$C%>&B'];
let MyEnum;

@@ -54,3 +54,3 @@ (function (MyEnum) {

(0, globals_1.test)('getEnumLabels mixed string index', () => {
var __ΩMyEnum = ['first', 'second', () => "my_second", 'third', () => "my_third", 'PC!C">#C$>%B'];
const __ΩMyEnum = ['first', 'second', () => "my_second", 'third', () => "my_third", 'PC!C">#C$>%B'];
let MyEnum;

@@ -66,3 +66,3 @@ (function (MyEnum) {

(0, globals_1.test)('getEnumLabels string index same name', () => {
var __ΩMyEnum = ['first', () => "first", 'second', () => "second", 'third', () => "third", 'PC!>"C#>$C%>&B'];
const __ΩMyEnum = ['first', () => "first", 'second', () => "second", 'third', () => "third", 'PC!>"C#>$C%>&B'];
let MyEnum;

@@ -69,0 +69,0 @@ (function (MyEnum) {

@@ -1,2 +0,2 @@

var __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"'];
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"'];
/*

@@ -3,0 +3,0 @@ * Deepkit Framework

@@ -336,4 +336,8 @@ /**

export declare function isIterable(value: any): boolean;
/**
* Returns __filename, works in both cjs and esm.
*/
export declare function getCurrentFileName(): string;
export declare type __ΩClassType = any[];
export declare type __ΩAbstractClassType = any[];
export declare type __ΩExtractClassType = any[];

@@ -695,2 +695,18 @@ const __ΩPropertyKey = ['P&\'+J'];

isIterable.__type = ['value', 'isIterable', 'P"2!)/"'];
/**
* Returns __filename, works in both cjs and esm.
*/
export function getCurrentFileName() {
const e = new Error;
const initiator = e.stack.split('\n').slice(2, 3)[0];
let path = /(?<path>[^(\s]+):[0-9]+:[0-9]+/.exec(initiator).groups.path;
if (path.indexOf('file') >= 0) {
path = new URL(path).pathname;
}
if (path[0] === '/' && process.platform === 'win32') {
path = path.slice(1);
}
return path;
}
getCurrentFileName.__type = ['getCurrentFileName', 'P&/!'];
//# sourceMappingURL=core.js.map

@@ -11,4 +11,4 @@ /*

import { arrayRemoveItem } from './array';
var __ΩAsyncSubscriber = ['T', 'event', '', 'b!Pe"!2"P$`$J/#'];
var __ΩAsyncEventSubscription = ['', 'unsubscribe', 'PP$/!4"M'];
const __ΩAsyncSubscriber = ['T', 'event', '', 'b!Pe"!2"P$`$J/#'];
const __ΩAsyncEventSubscription = ['', 'unsubscribe', 'PP$/!4"M'];
export { __ΩAsyncEventSubscription as __ΩAsyncEventSubscription };

@@ -15,0 +15,0 @@ let asyncId = 0;

@@ -1,7 +0,7 @@

var __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'b!P."4#8e"!4$M'];
var __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'b!P."4#e"!4$M'];
var __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'b!"c"Pe"!o#"e""o$"J'];
var __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,M'];
var __ΩArrayLike = ['T', 'length', 'b!P\'4"9\'e"!LM'];
var __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'b!Pe"!o""Pe#!o#"1$M'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'b!P."4#8e"!4$M'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'b!P."4#e"!4$M'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'b!"c"Pe"!o#"e""o$"J'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,M'];
const __ΩArrayLike = ['T', 'length', 'b!P\'4"9\'e"!LM'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'b!Pe"!o""Pe#!o#"1$M'];
eachKey.__type = [() => __ΩArrayLike, 'object', () => __ΩIterableIterator, 'eachKey', 'P"o!"2"\'o#"/$'];

@@ -8,0 +8,0 @@ eachKey.__type = ['object', () => __ΩIterableIterator, 'eachKey', 'P"2!&o""/#'];

import { expect, test } from '@jest/globals';
import { getEnumLabels, getEnumValues } from '../src/enum';
test('getEnumLabels numbered index', () => {
var __ΩMyEnum = ['first', 'second', 'third', 'PC!C"C#B'];
const __ΩMyEnum = ['first', 'second', 'third', 'PC!C"C#B'];
let MyEnum;

@@ -15,3 +15,3 @@ (function (MyEnum) {

test('getEnumLabels custom numbered index', () => {
var __ΩMyEnum = ['first', () => 400, 'second', () => 500, 'third', () => 600, 'PC!>"C#>$C%>&B'];
const __ΩMyEnum = ['first', () => 400, 'second', () => 500, 'third', () => 600, 'PC!>"C#>$C%>&B'];
let MyEnum;

@@ -27,3 +27,3 @@ (function (MyEnum) {

test('getEnumLabels partial custom numbered index', () => {
var __ΩMyEnum = ['first', 'second', () => 500, 'third', 'PC!C">#C$B'];
const __ΩMyEnum = ['first', 'second', () => 500, 'third', 'PC!C">#C$B'];
let MyEnum;

@@ -39,3 +39,3 @@ (function (MyEnum) {

test('getEnumLabels string index', () => {
var __ΩMyEnum = ['first', () => "my_first", 'second', () => "my_second", 'third', () => "my_third", 'PC!>"C#>$C%>&B'];
const __ΩMyEnum = ['first', () => "my_first", 'second', () => "my_second", 'third', () => "my_third", 'PC!>"C#>$C%>&B'];
let MyEnum;

@@ -51,3 +51,3 @@ (function (MyEnum) {

test('getEnumLabels mixed string index', () => {
var __ΩMyEnum = ['first', 'second', () => "my_second", 'third', () => "my_third", 'PC!C">#C$>%B'];
const __ΩMyEnum = ['first', 'second', () => "my_second", 'third', () => "my_third", 'PC!C">#C$>%B'];
let MyEnum;

@@ -63,3 +63,3 @@ (function (MyEnum) {

test('getEnumLabels string index same name', () => {
var __ΩMyEnum = ['first', () => "first", 'second', () => "second", 'third', () => "third", 'PC!>"C#>$C%>&B'];
const __ΩMyEnum = ['first', () => "first", 'second', () => "second", 'third', () => "third", 'PC!>"C#>$C%>&B'];
let MyEnum;

@@ -66,0 +66,0 @@ (function (MyEnum) {

{
"name": "@deepkit/core",
"version": "1.0.1-alpha.63",
"version": "1.0.1-alpha.65",
"description": "Deepkit core library",

@@ -40,3 +40,3 @@ "type": "commonjs",

},
"gitHead": "c39860f0ef10fe98cc509dd2c795cc8e1cb30e3a"
"gitHead": "dde15533a9c43e6d46d84469f1b753a9d13212b2"
}

@@ -697,1 +697,17 @@ /*

}
/**
* Returns __filename, works in both cjs and esm.
*/
export function getCurrentFileName(): string {
const e = new Error;
const initiator = e.stack!.split('\n').slice(2, 3)[0];
let path = /(?<path>[^(\s]+):[0-9]+:[0-9]+/.exec(initiator)!.groups!.path;
if (path.indexOf('file') >= 0) {
path = new URL(path).pathname;
}
if (path[0] === '/' && process.platform === 'win32') {
path = path.slice(1);
}
return path;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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