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.
@@ -0,0 +1,13 @@
1
+ module.exports = function (p) {
2
+ var s = [];
3
+ while (p) {
4
+ var reg = /[\$\/\\]/g;
5
+ reg.lastIndex = 1;
6
+ var m = reg.exec(p);
7
+ var i = m ? m.index : p.length;
8
+ s.push(p.slice(0, i));
9
+ p = p.slice(i + 1);
10
+ }
11
+ if (m) s.push('');
12
+ return s;
13
+ }
@@ -153,7 +153,7 @@ class BigNumber {
153
153
  v = +v;
154
154
  }
155
155
  else v = vmap[v];
156
- if (Number.isNaN(v) || v >= system_scale || v !== +v) throw new Error("数据错误!");
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))
@@ -1,5 +1,5 @@
1
1
  function isEmpty(value) {
2
- if (value === '' || value === null || value === undefined || Number.isNaN(value)) return true;
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;
@@ -1,5 +1,5 @@
1
1
  function isHandled(value) {
2
- if (value === '' || value === null || value === undefined || Number.isNaN(value)) return false;
2
+ if (value === '' || value === null || value === undefined || value !== value) return false;
3
3
  return true;
4
4
  }
5
5
  module.exports = isHandled;
@@ -1,4 +1,3 @@
1
- var isNaN = Number.isNaN;
2
1
  function isSame(o1, o2) {
3
- return o1 === o2 || isNaN(o1) && isNaN(o2);
2
+ return o1 === o2 || o1 !== o1 && o2 !== o2;
4
3
  }
@@ -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: !Number.isNaN(c), text: String(c) }; break;
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 => efront$$split(f).join('/')).map(filename => {
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];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.3.14",
3
+ "version": "4.3.15",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {