v-transform 1.0.4 → 1.0.5

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/package.json CHANGED
@@ -4,13 +4,14 @@
4
4
  "vt": "src/index.js"
5
5
  },
6
6
  "type": "module",
7
- "version": "1.0.4",
7
+ "version": "1.0.5",
8
8
  "main": "index.js",
9
9
  "repository": "https://github.com/VickScarlet/vTransform.git",
10
10
  "author": "Vick Scarlet <scarlet_vick@outlook.com>",
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
13
  "commander": "^8.2.0",
14
+ "js-yaml": "^4.1.0",
14
15
  "xlsx": "^0.17.1"
15
16
  }
16
17
  }
@@ -1,3 +1,5 @@
1
+ import yaml from 'js-yaml';
2
+
1
3
  function parseStruct(head) {
2
4
  const layer = [];
3
5
  const subs = {};
@@ -92,7 +94,7 @@ function formatRow({type, key, source, subs}, row, original, json) {
92
94
  return {
93
95
  key,
94
96
  value: json.includes(source)
95
- ? JSON.parse(value)
97
+ ? yaml.load(value)
96
98
  : value
97
99
  };
98
100
  } catch(e) {