mm_expand 1.6.0 → 1.6.1

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.
Files changed (3) hide show
  1. package/index.js +10 -2
  2. package/package.json +1 -1
  3. package/test.js +2 -1
package/index.js CHANGED
@@ -1254,8 +1254,16 @@ if (typeof($) === "undefined") {
1254
1254
  file = join(dir, file);
1255
1255
  }
1256
1256
  }
1257
- if (file.indexOf('.') === -1 && !file.endsWith(slash)) {
1258
- file += slash;
1257
+ if (!file.endsWith(slash)) {
1258
+ if(file.indexOf('.') === -1){
1259
+ file += slash;
1260
+ }
1261
+ else {
1262
+ var arr = file.split(slash);
1263
+ if(arr[arr.length - 1].indexOf('.') === -1){
1264
+ file += slash;
1265
+ }
1266
+ }
1259
1267
  }
1260
1268
  return file;
1261
1269
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_expand",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "这是超级美眉原型函数拓展模块,更有利于对string、array、object的操作,避免出错,简化业务逻辑。",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/test.js CHANGED
@@ -14,10 +14,11 @@ console.log("/fast/log".fullname());
14
14
  console.log("/fast/log/".fullname());
15
15
  console.log("/fast/log.lgo".fullname());
16
16
  console.log("/fast/log.lgo\\".fullname());
17
- console.log("/fast/log.lgo/".fullname());
18
17
  console.log("E:\\github\\mm_modules\\mm_expand\\fast\\log\\".fullname(__dirname));
19
18
  console.log("E:\\github\\mm_modules\\mm_expand\\fast\\log\\".fullname());
20
19
  console.log("E:\\github\\mm_modules\\mm_expand\\fast\\log".fullname());
20
+
21
+ console.log("/fast/log.lgo\\log".fullname());
21
22
  // var arr1 = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
22
23
 
23
24
  // var arr1 = [{