mm_os 2.5.6 → 2.5.7

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.
@@ -75,7 +75,28 @@ Drive.prototype.options = function() {
75
75
  var dict = {};
76
76
  for (var i = 0; i < op.length; i++) {
77
77
  var o = op[i];
78
- dict[o.name] = o.value;
78
+ if (o.type === "number") {
79
+ var val = o.value === 'null' ? '0' : o.value;
80
+ dict[o.name] = Number(val || '0');
81
+ } else if (o.type === "boolean") {
82
+ var val = false;
83
+ if (o.value) {
84
+ if (o.value == '1' || o.value == 'true') {
85
+ val = true;
86
+ }
87
+ }
88
+ dict[o.name] = val;
89
+ } else if (o.type === "object") {
90
+ var val = o.value === 'null' ? '{}' : o.value;
91
+ dict[o.name] = o.value.toJSON();
92
+ } else if (o.type === "array") {
93
+ var val = o.value === 'null' ? '[]' : o.value;
94
+ dict[o.name] = o.value.toJSON();
95
+ } else if (o.value === "null") {
96
+ dict[o.name] = null;
97
+ } else {
98
+ dict[o.name] = o.value;
99
+ }
79
100
  }
80
101
  return dict;
81
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_os",
3
- "version": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "这是超级美眉服务端框架,用于快速构建应用程序。",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/package.txt ADDED
@@ -0,0 +1 @@
1
+ mm_check mm_excel mm_expand mm_html mm_koa_proxy mm_logs mm_machine mm_mongodb mm_mqtt mm_mysql mm_redis mm_ret mm_session mm_statics mm_tpl mm_xml