@raytio/core 9.0.2 → 9.0.3
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.
|
@@ -28,8 +28,10 @@ function copyObjectWithSortedKeys(object) {
|
|
|
28
28
|
return `[${object.map(copyObjectWithSortedKeys).join(",")}]`;
|
|
29
29
|
}
|
|
30
30
|
if (typeof object === "number" && object % 1 !== 0) {
|
|
31
|
+
if (Number.isNaN(object) || !Number.isFinite(object))
|
|
32
|
+
return "null";
|
|
31
33
|
// float
|
|
32
|
-
const exponent = Math.
|
|
34
|
+
const exponent = Math.floor(Math.log10(Math.abs(object)));
|
|
33
35
|
let mantissa = `${object / 10 ** exponent}`;
|
|
34
36
|
if (!mantissa.includes("."))
|
|
35
37
|
mantissa += ".0";
|
|
@@ -43,7 +43,7 @@ function getPOVerification({ PO, schema, realVers, }) {
|
|
|
43
43
|
const fieldVerifications = (0, ramda_1.mapObjIndexed)((content, fieldName) => {
|
|
44
44
|
const pertainingVers = realVers.filter(x => x.fieldName === fieldName &&
|
|
45
45
|
// using ramda's `equals` because this needs to work for objects/arrays
|
|
46
|
-
(0, ramda_1.equals)(x.value, (0, maybeRereference_1.maybeRereference)(content)) &&
|
|
46
|
+
(0, ramda_1.equals)((0, maybeRereference_1.maybeRereference)(x.value), (0, maybeRereference_1.maybeRereference)(content)) &&
|
|
47
47
|
// if an nId is supplied, also filter out verifications that don't relate to that n_id
|
|
48
48
|
(PO.n_id ? x.belongsToNId === PO.n_id : true));
|
|
49
49
|
// .every() illogically returns true for arrays with zero length
|
|
@@ -10,7 +10,7 @@ const getVerifiedBy = ({ nId, realVers, shouldBeVerifiedProps, }) => {
|
|
|
10
10
|
const pertainingVers = realVers
|
|
11
11
|
.filter(x => mayBeVerifiedFields.includes(x.fieldName) &&
|
|
12
12
|
// using ramda's `equals` because this needs to work for objects/arrays
|
|
13
|
-
(0, ramda_1.equals)((0, maybeRereference_1.maybeRereference)(shouldBeVerifiedProps[x.fieldName]), x.value) &&
|
|
13
|
+
(0, ramda_1.equals)((0, maybeRereference_1.maybeRereference)(shouldBeVerifiedProps[x.fieldName]), (0, maybeRereference_1.maybeRereference)(x.value)) &&
|
|
14
14
|
// if an nId is supplied, also filter out verifications that don't relate to that n_id
|
|
15
15
|
(nId ? x.belongsToNId === nId : true))
|
|
16
16
|
.map(x => x.provider);
|