@mikro-orm/core 7.0.0-dev.143 → 7.0.0-dev.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/Utils.d.ts +1 -1
- package/utils/Utils.js +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.144",
|
|
5
5
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
package/utils/Utils.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ export declare class Utils {
|
|
|
139
139
|
* Extracts all possible values of a TS enum. Works with both string and numeric enums.
|
|
140
140
|
*/
|
|
141
141
|
static extractEnumValues(target: Dictionary): (string | number)[];
|
|
142
|
-
static flatten<T>(arrays: T[][]): T[];
|
|
142
|
+
static flatten<T>(arrays: T[][], deep?: boolean): T[];
|
|
143
143
|
static isOperator(key: PropertyKey, includeGroupOperators?: boolean): boolean;
|
|
144
144
|
static hasNestedKey(object: unknown, key: string): boolean;
|
|
145
145
|
static getORMVersion(): string;
|
package/utils/Utils.js
CHANGED
|
@@ -123,7 +123,7 @@ export function parseJsonSafe(value) {
|
|
|
123
123
|
}
|
|
124
124
|
export class Utils {
|
|
125
125
|
static PK_SEPARATOR = '~~~';
|
|
126
|
-
static #ORM_VERSION = '7.0.0-dev.
|
|
126
|
+
static #ORM_VERSION = '7.0.0-dev.144';
|
|
127
127
|
/**
|
|
128
128
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
129
129
|
*/
|
|
@@ -642,8 +642,8 @@ export class Utils {
|
|
|
642
642
|
}
|
|
643
643
|
return values;
|
|
644
644
|
}
|
|
645
|
-
static flatten(arrays) {
|
|
646
|
-
return
|
|
645
|
+
static flatten(arrays, deep) {
|
|
646
|
+
return arrays.flatMap(v => deep && Array.isArray(v) ? this.flatten(v, true) : v);
|
|
647
647
|
}
|
|
648
648
|
static isOperator(key, includeGroupOperators = true) {
|
|
649
649
|
if (!includeGroupOperators) {
|