j-templates 6.1.9 → 6.1.10

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.
@@ -13,16 +13,16 @@ function CreateNodeValueAssignment(target) {
13
13
  };
14
14
  }
15
15
  function WalkValue(next, callback, index = 0, parent = "") {
16
- const keys = Object.keys(next);
17
- for (let x = 0; x < keys.length; x++) {
18
- const value = next[keys[x]];
16
+ const entries = Object.entries(next);
17
+ for (let x = 0; x < entries.length; x++) {
18
+ const [key, value] = entries[x];
19
19
  const type = (0, json_1.JsonType)(value);
20
20
  switch (type) {
21
21
  case "object":
22
- index = WalkValue(value, callback, index, `${parent}${keys[x]}.`);
22
+ index = WalkValue(value, callback, index, `${parent}${key}.`);
23
23
  break;
24
24
  default:
25
- callback(`${parent}${keys[x]}`, value, index);
25
+ callback(`${parent}${key}`, value, index);
26
26
  index++;
27
27
  break;
28
28
  }
@@ -51,7 +51,9 @@ function GetAssignmentFunction(path) {
51
51
  }
52
52
  }
53
53
  function CreatePropertyAssignment(target) {
54
- const last = [["", null, null]];
54
+ const last = [
55
+ ["", null, null],
56
+ ];
55
57
  function WalkCallback(path, value, index) {
56
58
  if (index >= last.length || last[index][0] !== path) {
57
59
  last[index] = [path, value, GetAssignmentFunction(path)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "j-templates",
3
- "version": "6.1.9",
3
+ "version": "6.1.10",
4
4
  "description": "j-templates",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/TypesInCode/jTemplates",