@finos/legend-shared
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -46,3 +46,3 @@ /** | ||
export declare const hashString: (val: string) => string; | ||
export declare const hashArray: (arr: (string | Hashable)[]) => string; | ||
export declare const hashArray: (arr: (string | boolean | number | Hashable)[]) => string; | ||
/** | ||
@@ -49,0 +49,0 @@ * NOTE: `node-object-hash` seems to be the much more efficient library. But it's based on Node's `crypto` module |
@@ -19,3 +19,7 @@ /** | ||
export const hashArray = (arr) => hashString(arr | ||
.map((val) => (typeof val === 'string' ? hashString(val) : val.hashCode)) | ||
.map((val) => typeof val === 'string' | ||
? hashString(val) | ||
: typeof val === 'boolean' || typeof val === 'number' | ||
? val.toString() | ||
: val.hashCode) | ||
.join(',')); | ||
@@ -22,0 +26,0 @@ /** |
{ | ||
"name": "@finos/legend-shared", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "Legend Studio shared utilities and helpers", | ||
@@ -65,3 +65,3 @@ "keywords": [ | ||
"cross-env": "7.0.3", | ||
"eslint": "8.20.0", | ||
"eslint": "8.21.0", | ||
"jest": "28.1.3", | ||
@@ -68,0 +68,0 @@ "lodash": "4.17.21", |
{ | ||
"name": "@finos/legend-shared", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "Legend Studio shared utilities and helpers", | ||
@@ -62,6 +62,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"@finos/legend-dev-utils": "2.0.6", | ||
"@finos/legend-dev-utils": "2.0.8", | ||
"@jest/globals": "28.1.3", | ||
"cross-env": "7.0.3", | ||
"eslint": "8.20.0", | ||
"eslint": "8.21.0", | ||
"jest": "28.1.3", | ||
@@ -68,0 +68,0 @@ "lodash": "4.17.21", |
@@ -52,6 +52,14 @@ /** | ||
export const hashArray = (arr: (string | Hashable)[]): string => | ||
export const hashArray = ( | ||
arr: (string | boolean | number | Hashable)[], | ||
): string => | ||
hashString( | ||
arr | ||
.map((val) => (typeof val === 'string' ? hashString(val) : val.hashCode)) | ||
.map((val) => | ||
typeof val === 'string' | ||
? hashString(val) | ||
: typeof val === 'boolean' || typeof val === 'number' | ||
? val.toString() | ||
: val.hashCode, | ||
) | ||
.join(','), | ||
@@ -58,0 +66,0 @@ ); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
341043
6207