seroval 1.5.0 → 1.5.2

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.
@@ -2097,7 +2097,11 @@ function assignStringProperty(object, key, value) {
2097
2097
  }
2098
2098
  function assignProperty(ctx, depth, object, key, value) {
2099
2099
  if (typeof key === "string") {
2100
- assignStringProperty(object, key, deserialize(ctx, depth, value));
2100
+ assignStringProperty(
2101
+ object,
2102
+ deserializeString(key),
2103
+ deserialize(ctx, depth, value)
2104
+ );
2101
2105
  } else {
2102
2106
  const actual = deserialize(ctx, depth, key);
2103
2107
  switch (typeof actual) {
@@ -2696,7 +2700,11 @@ function createObjectAssign(ctx, ref, key, value) {
2696
2700
  createAssignment(ctx.base, getRefParam(ctx, ref) + "." + key, value);
2697
2701
  }
2698
2702
  function createSequenceAssign(ctx, ref, index, value) {
2699
- createAssignment(ctx.base, getRefParam(ctx, ref) + ".v[" + index + "]", value);
2703
+ createAssignment(
2704
+ ctx.base,
2705
+ getRefParam(ctx, ref) + ".v[" + index + "]",
2706
+ value
2707
+ );
2700
2708
  }
2701
2709
  function isIndexedValueInStack(ctx, node) {
2702
2710
  return node.t === 4 /* IndexedValue */ && ctx.stack.includes(node.i);
@@ -3997,6 +4005,7 @@ function toCrossJSONStream(source, options) {
3997
4005
  plugins,
3998
4006
  refs: options.refs,
3999
4007
  disabledFeatures: options.disabledFeatures,
4008
+ depthLimit: options.depthLimit,
4000
4009
  onParse: options.onParse,
4001
4010
  onError: options.onError,
4002
4011
  onDone: options.onDone
@@ -4010,7 +4019,8 @@ function fromCrossJSON(source, options) {
4010
4019
  plugins,
4011
4020
  refs: options.refs,
4012
4021
  features: options.features,
4013
- disabledFeatures: options.disabledFeatures
4022
+ disabledFeatures: options.disabledFeatures,
4023
+ depthLimit: options.depthLimit
4014
4024
  });
4015
4025
  return deserializeTop(ctx, source);
4016
4026
  }