@cardano-sdk/util
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -45,2 +45,8 @@ "use strict"; | ||
} | ||
if (obj instanceof Set) { | ||
return { | ||
[transformationTypeKey]: 'Set', | ||
value: [...obj].map((item) => (0, exports.toSerializableObject)(item, options)) | ||
}; | ||
} | ||
if (obj instanceof Map) { | ||
@@ -87,2 +93,4 @@ return { | ||
return new Date(docAsAny.value); | ||
case 'Set': | ||
return new Set(docAsAny.value.map((item) => fromSerializableObjectUnknown(item, options))); | ||
case 'Map': | ||
@@ -89,0 +97,0 @@ return new Map(docAsAny.value.map((keyValues) => keyValues.map((kv) => fromSerializableObjectUnknown(kv, options)))); |
@@ -39,2 +39,8 @@ import { serializeError } from 'serialize-error'; | ||
} | ||
if (obj instanceof Set) { | ||
return { | ||
[transformationTypeKey]: 'Set', | ||
value: [...obj].map((item) => toSerializableObject(item, options)) | ||
}; | ||
} | ||
if (obj instanceof Map) { | ||
@@ -80,2 +86,4 @@ return { | ||
return new Date(docAsAny.value); | ||
case 'Set': | ||
return new Set(docAsAny.value.map((item) => fromSerializableObjectUnknown(item, options))); | ||
case 'Map': | ||
@@ -82,0 +90,0 @@ return new Map(docAsAny.value.map((keyValues) => keyValues.map((kv) => fromSerializableObjectUnknown(kv, options)))); |
{ | ||
"name": "@cardano-sdk/util", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "General, not cardano-specific utils", | ||
@@ -17,4 +17,17 @@ "engines": { | ||
"repository": "https://github.com/input-output-hk/cardano-js-sdk/packages/util", | ||
"author": "Mircea Hasegan <mircea.hasegan@iohk.io>", | ||
"license": "MPL-2.0", | ||
"contributors": [ | ||
"Rhys Bartels-Waller <rhys.bartelswaller@iohk.io> (https://iohk.io)", | ||
"Martynas Kazlauskas <martynas.kazlauskas@iohk.io> (https://iohk.io)", | ||
"Daniele Ricci <daniele.ricci@iohk.io> (https://iohk.io)", | ||
"Ivaylo Andonov <ivaylo.andonov@iohk.io> (https://iohk.io)", | ||
"Mircea Hasegan <mircea.hasegan@iohk.io> (https://iohk.io)", | ||
"Angel Castillo Bacigalupi <angel.castillo@iohk.io> (https://iohk.io)", | ||
"Seung Eun Song <seungeun.song@iohk.io> (https://iohk.io)", | ||
"Dmytro Iakymenko <dmytro.iakymenko@iohk.io> (https://iohk.io)", | ||
"Tomislav Horaček <tomislav.horacek@iohk.io> (https://iohk.io)", | ||
"Michael Chappell <michael.chappell@iohk.io> (https://iohk.io)", | ||
"Leonel Gobbi <leonel.gobbi@globant.com> (https://www.globant.com)", | ||
"Juan Cruz Vieiro <juan.vieiro@globant.com> (https://www.globant.com)" | ||
], | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
@@ -39,3 +52,7 @@ "build:esm": "tsc -p src/tsconfig.json --outDir ./dist/esm --module es2020", | ||
"devDependencies": { | ||
"ts-custom-error": "^3.2.0" | ||
"@types/node": "14.18.12", | ||
"@types/lodash": "^4.14.182", | ||
"shx": "^0.3.3", | ||
"ts-custom-error": "^3.2.0", | ||
"typescript": "4.6.3" | ||
}, | ||
@@ -42,0 +59,0 @@ "dependencies": { |
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
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
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
245734
0
100
404
5