@anandamideio/entity
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -10,2 +10,8 @@ /** | ||
/** | ||
* Creates a new Entity instance. | ||
* | ||
* @param {Record<Identifiers, EntityType>} entities - An object containing entities to add to the entity map. | ||
*/ | ||
constructor(entities?: Record<Identifiers, EntityType>); | ||
/** | ||
* Adds a new entity to the entity map. | ||
@@ -12,0 +18,0 @@ * |
@@ -12,2 +12,16 @@ "use strict"; | ||
/** | ||
* Creates a new Entity instance. | ||
* | ||
* @param {Record<Identifiers, EntityType>} entities - An object containing entities to add to the entity map. | ||
*/ | ||
constructor(entities) { | ||
if (entities) { | ||
Object | ||
.entries(entities) | ||
.forEach(([identifier, entity]) => { | ||
this.add(identifier, entity); | ||
}); | ||
} | ||
} | ||
/** | ||
* Adds a new entity to the entity map. | ||
@@ -14,0 +28,0 @@ * |
{ | ||
"name": "@anandamideio/entity", | ||
"main": "dist/index.js", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"scripts": { | ||
@@ -10,3 +10,3 @@ "build": "tsc -p tsconfig.json" | ||
"@eslint/js": "^9.1.1", | ||
"@magik_io/lint_golem": "^1.3.0", | ||
"@magik_io/lint_golem": "^1.5.0", | ||
"@types/eslint": "^8.56.10", | ||
@@ -16,5 +16,5 @@ "@types/eslint__js": "^8.42.3", | ||
"typescript": "^5.4.5", | ||
"typescript-eslint": "^7.7.1" | ||
"typescript-eslint": "^7.8.0" | ||
}, | ||
"packageManager": "yarn@4.1.1" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13714
350