fit-file-parser 2.3.2 → 2.3.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.
- package/dist/binary.js +3 -1
- package/dist/cjs/binary.js +3 -1
- package/package.json +1 -1
package/dist/binary.js
CHANGED
|
@@ -128,7 +128,9 @@ function formatByType(data, type, scale, offset) {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
if (!values.includes('mask')) {
|
|
131
|
-
|
|
131
|
+
const typeMap = FIT.types[type];
|
|
132
|
+
const mapped = typeMap[String(data)];
|
|
133
|
+
return mapped === undefined ? data : mapped;
|
|
132
134
|
}
|
|
133
135
|
const dataItem = {};
|
|
134
136
|
for (const key in FIT.types[type]) {
|
package/dist/cjs/binary.js
CHANGED
|
@@ -134,7 +134,9 @@ function formatByType(data, type, scale, offset) {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
if (!values.includes('mask')) {
|
|
137
|
-
|
|
137
|
+
const typeMap = fit_js_1.FIT.types[type];
|
|
138
|
+
const mapped = typeMap[String(data)];
|
|
139
|
+
return mapped === undefined ? data : mapped;
|
|
138
140
|
}
|
|
139
141
|
const dataItem = {};
|
|
140
142
|
for (const key in fit_js_1.FIT.types[type]) {
|