Sign In

@mikro-orm/core

Package Overview
Dependencies
Maintainers
1
Versions
4744
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mikro-orm/core - npm Package Compare versions

Comparing version
7.1.13-dev.4
to
7.1.13-dev.5
+1
-1
package.json
{
"name": "@mikro-orm/core",
"version": "7.1.13-dev.4",
"version": "7.1.13-dev.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.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -61,3 +61,3 @@ import type { CompiledFunctions, Dictionary, EntityData, EntityDictionary, EntityKey, EntityMetadata, EntityName, EntityProperty, Primary } from '../typings.js';

*/
static unique<T = string>(items: T[]): T[];
static unique<T = string>(items: T[], equals?: (a: T, b: T) => boolean): T[];
/**

@@ -64,0 +64,0 @@ * Merges all sources into the target recursively.

@@ -156,3 +156,3 @@ import { clone } from './clone.js';

static PK_SEPARATOR = '~~~';
static #ORM_VERSION = '7.1.13-dev.4';
static #ORM_VERSION = '7.1.13-dev.5';
/**

@@ -220,6 +220,9 @@ * Checks if the argument is instance of `Object`. Returns false for arrays.

*/
static unique(items) {
static unique(items, equals) {
if (items.length < 2) {
return items;
}
if (equals) {
return items.filter((a, idx) => items.findIndex(b => equals(a, b)) === idx);
}
return [...new Set(items)];

@@ -226,0 +229,0 @@ }

Sorry, the diff of this file is too big to display