@d4l/collect-lib 1.39.3 → 1.40.0

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/index.mjs CHANGED
@@ -979,15 +979,21 @@ var RECORDING_MODEL_CURRENT_VERSION = "0.0.6";
979
979
  var RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "1.0.0";
980
980
 
981
981
  // src/types/survey.ts
982
+ function isScalarAnswer(answer) {
983
+ return typeof answer === "string";
984
+ }
985
+ function isArrayAnswer(answer) {
986
+ return Array.isArray(answer);
987
+ }
988
+ function isGeoLocationAnswer(answer) {
989
+ return Array.isArray(answer) && answer.length === 2 && [answer[0], answer[1]].every((s) => Number.isFinite(Number(s)));
990
+ }
982
991
  function isMatrixAnswer(answer) {
983
992
  return typeof answer === "object" && answer !== null && !Array.isArray(answer);
984
993
  }
985
994
  function isFlatAnswer(answer) {
986
995
  return typeof answer === "string" || Array.isArray(answer);
987
996
  }
988
- function isScalarAnswer(answer) {
989
- return typeof answer === "string";
990
- }
991
997
 
992
998
  // src/fhir/consent.ts
993
999
  import { Buffer as Buffer3 } from "buffer/";
@@ -6045,8 +6051,10 @@ export {
6045
6051
  getText,
6046
6052
  getTimeFuncs,
6047
6053
  indexArrayBy,
6054
+ isArrayAnswer,
6048
6055
  isBeforeStartDate,
6049
6056
  isFlatAnswer,
6057
+ isGeoLocationAnswer,
6050
6058
  isMatrixAnswer,
6051
6059
  isNotAfterEndDate,
6052
6060
  isNotBeforeStartDate,