efront 4.3.14 → 4.3.15
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/coms/basic/$split.js +13 -0
- package/coms/basic/BigNumber.js +1 -1
- package/coms/basic/isEmpty.js +1 -1
- package/coms/basic/isHandled.js +1 -1
- package/coms/basic/isSame.js +1 -2
- package/coms/compile/cloneNode.js +1 -1
- package/coms/reptile/detectWithExtension.js +2 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/basic/BigNumber.js
CHANGED
|
@@ -153,7 +153,7 @@ class BigNumber {
|
|
|
153
153
|
v = +v;
|
|
154
154
|
}
|
|
155
155
|
else v = vmap[v];
|
|
156
|
-
if (
|
|
156
|
+
if (v !== v || v >= system_scale || v !== +v) throw new Error("数据错误!");
|
|
157
157
|
|
|
158
158
|
if (dotOccurs) {
|
|
159
159
|
num = BigNumber.add(num, BigNumber.div(v, scale, BigNumber.DECIMAL_DIGIT))
|
package/coms/basic/isEmpty.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function isEmpty(value) {
|
|
2
|
-
if (value === '' || value === null || value === undefined ||
|
|
2
|
+
if (value === '' || value === null || value === undefined || value !== value) return true;
|
|
3
3
|
if (value instanceof Array && value.length === 0 || value.constructor === Object || !value.constructor) {
|
|
4
4
|
for (var k in value) return false;
|
|
5
5
|
return true;
|
package/coms/basic/isHandled.js
CHANGED
package/coms/basic/isSame.js
CHANGED
|
@@ -13,7 +13,7 @@ var cloneNode = function (o) {
|
|
|
13
13
|
c = Object.assign({}, c);
|
|
14
14
|
}
|
|
15
15
|
else switch (typeof c) {
|
|
16
|
-
case "number": case "bigint": c = { type: VALUE, isdigit:
|
|
16
|
+
case "number": case "bigint": c = { type: VALUE, isdigit: c === c, text: String(c) }; break;
|
|
17
17
|
case "boolean": case "undefined": c = { type: VALUE, text: String(c) }; break;
|
|
18
18
|
case "regexp": c = { type: QUOTED, text: String(c) }; break;
|
|
19
19
|
case "string": c = scanner2(c); break;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var path = require("path");
|
|
2
2
|
var fs = require("fs").promises;
|
|
3
|
+
var $split = require("../basic/$split");
|
|
3
4
|
var str2array = require("../basic/str2array");
|
|
4
5
|
async function detectWithExtension(filenames, extensions = [""], folders = [""]) {
|
|
5
6
|
if (typeof filenames === 'string') filenames = str2array(filenames);
|
|
@@ -10,7 +11,7 @@ async function detectWithExtension(filenames, extensions = [""], folders = [""])
|
|
|
10
11
|
}
|
|
11
12
|
if (folders === null) folders = [""];
|
|
12
13
|
extensions = [].concat(extensions);
|
|
13
|
-
filenames = filenames.map(f =>
|
|
14
|
+
filenames = filenames.map(f => $split(f).join('/')).map(filename => {
|
|
14
15
|
var tempname = filename.replace(/[#\?][\s\S]*$/, '');
|
|
15
16
|
var params = filename.slice(tempname.length);
|
|
16
17
|
return [tempname, params];
|