@bian-womp/spark-graph 0.3.21 → 0.3.22

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/lib/cjs/index.cjs CHANGED
@@ -5881,8 +5881,9 @@ function buildValueConverter(config) {
5881
5881
  else {
5882
5882
  if (typeof matchValue === "string" ||
5883
5883
  typeof matchValue === "number") {
5884
- if (matchValue in mapping.valueMap) {
5885
- newValue = mapping.valueMap[matchValue];
5884
+ const key = String(matchValue);
5885
+ if (key in mapping.valueMap) {
5886
+ newValue = mapping.valueMap[key];
5886
5887
  changed = true;
5887
5888
  }
5888
5889
  }
@@ -5915,8 +5916,9 @@ function buildValueConverter(config) {
5915
5916
  else {
5916
5917
  if (typeof innerValue === "string" ||
5917
5918
  typeof innerValue === "number") {
5918
- if (innerValue in mapping.valueMap) {
5919
- newValue = mapping.valueMap[innerValue];
5919
+ const key = String(innerValue);
5920
+ if (key in mapping.valueMap) {
5921
+ newValue = mapping.valueMap[key];
5920
5922
  // If mapped to null, return null to delete the output
5921
5923
  if (newValue === null) {
5922
5924
  return null;
@@ -5963,8 +5965,9 @@ function buildValueConverter(config) {
5963
5965
  else {
5964
5966
  if (typeof matchValue === "string" ||
5965
5967
  typeof matchValue === "number") {
5966
- if (matchValue in mapping.valueMap) {
5967
- newValue = mapping.valueMap[matchValue];
5968
+ const key = String(matchValue);
5969
+ if (key in mapping.valueMap) {
5970
+ newValue = mapping.valueMap[key];
5968
5971
  changed = true;
5969
5972
  }
5970
5973
  }
@@ -5986,8 +5989,9 @@ function buildValueConverter(config) {
5986
5989
  }
5987
5990
  else {
5988
5991
  if (typeof value === "string" || typeof value === "number") {
5989
- if (value in mapping.valueMap) {
5990
- return mapping.valueMap[value];
5992
+ const key = String(value);
5993
+ if (key in mapping.valueMap) {
5994
+ return mapping.valueMap[key];
5991
5995
  }
5992
5996
  }
5993
5997
  }