@fangzhongya/utils 0.0.6-3 → 0.0.6-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.
@@ -1,14 +1,14 @@
1
1
  export { i as array } from '../index-6be6487f.js';
2
2
  export { i as object } from '../index-3062a21e.js';
3
- export { i as string } from '../index-92355f5d.js';
3
+ export { i as string } from '../index-f29f088a.js';
4
4
  import './array/isArray.js';
5
5
  import './array/toggleArray.js';
6
6
  import './object/isObject.js';
7
7
  import './object/mergeObject.js';
8
8
  import './object/unmergeObject.js';
9
9
  import './string/appearNum.js';
10
- import './string/firstLower.js';
11
10
  import './string/appearNumSeat.js';
12
11
  import './string/firstUpper.js';
13
12
  import './string/getStartSame.js';
13
+ import './string/firstLower.js';
14
14
  import './string/getStartSames.js';
@@ -1,6 +1,6 @@
1
1
  export { appearNum } from './appearNum.js';
2
- export { firstLower } from './firstLower.js';
3
2
  export { appearNumSeat } from './appearNumSeat.js';
4
3
  export { firstUpper } from './firstUpper.js';
5
4
  export { getStartSame } from './getStartSame.js';
5
+ export { firstLower } from './firstLower.js';
6
6
  export { getStartSames } from './getStartSames.js';
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkR7AVUYCGcjs = require('./chunk-R7AVUYCG.cjs');
3
+ var _chunkO6GUK5PLcjs = require('./chunk-O6GUK5PL.cjs');
4
4
 
5
5
 
6
- var _chunkIDDTRJG3cjs = require('./chunk-IDDTRJG3.cjs');
6
+ var _chunkYK7WI6H7cjs = require('./chunk-YK7WI6H7.cjs');
7
7
 
8
8
 
9
9
  var _chunk6RIGEV6Gcjs = require('./chunk-6RIGEV6G.cjs');
@@ -17,8 +17,8 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
17
17
  // packages/urls/index.ts
18
18
  var urls_exports = {};
19
19
  _chunk5AZGAKWRcjs.__export.call(void 0, urls_exports, {
20
- getImportUrl: () => _chunkIDDTRJG3cjs.getImportUrl,
21
- getImportUrlSuffix: () => _chunkR7AVUYCGcjs.getImportUrlSuffix,
20
+ getImportUrl: () => _chunkYK7WI6H7cjs.getImportUrl,
21
+ getImportUrlSuffix: () => _chunkO6GUK5PLcjs.getImportUrlSuffix,
22
22
  getReplaceUrl: () => _chunk6RIGEV6Gcjs.getReplaceUrl,
23
23
  getUrlCatalogue: () => _chunkDILKJQYVcjs.getUrlCatalogue
24
24
  });
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getImportUrlSuffix
3
- } from "./chunk-2SR75KDV.js";
3
+ } from "./chunk-G6FL4SSB.js";
4
4
  import {
5
5
  getImportUrl
6
- } from "./chunk-V57XN54Z.js";
6
+ } from "./chunk-LFC6RYSS.js";
7
7
  import {
8
8
  getReplaceUrl
9
9
  } from "./chunk-ZRZ5HATA.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getImportUrl
3
- } from "./chunk-V57XN54Z.js";
3
+ } from "./chunk-LFC6RYSS.js";
4
4
 
5
5
  // packages/urls/getImportUrlSuffix.ts
6
6
  function getImportUrlSuffix(url, imp) {
@@ -13,7 +13,7 @@ function getImportUrl(url, imp) {
13
13
  ds.push("../");
14
14
  }
15
15
  }
16
- return ds.join("") + arr[2].replace(/\\/, "/");
16
+ return ds.join("") + arr[2].replace(/\\/g, "/");
17
17
  }
18
18
 
19
19
  export {
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkIDDTRJG3cjs = require('./chunk-IDDTRJG3.cjs');
3
+ var _chunkYK7WI6H7cjs = require('./chunk-YK7WI6H7.cjs');
4
4
 
5
5
  // packages/urls/getImportUrlSuffix.ts
6
6
  function getImportUrlSuffix(url, imp) {
7
- return _chunkIDDTRJG3cjs.getImportUrl.call(void 0, url, imp).replace(
7
+ return _chunkYK7WI6H7cjs.getImportUrl.call(void 0, url, imp).replace(
8
8
  /\.([a-z|A-Z]+)$/,
9
9
  ""
10
10
  );
@@ -13,7 +13,7 @@ function getImportUrl(url, imp) {
13
13
  ds.push("../");
14
14
  }
15
15
  }
16
- return ds.join("") + arr[2].replace(/\\/, "/");
16
+ return ds.join("") + arr[2].replace(/\\/g, "/");
17
17
  }
18
18
 
19
19
 
@@ -1,6 +1,6 @@
1
1
  import { i as index$1 } from './index-6be6487f.js';
2
2
  import { i as index$2 } from './index-3062a21e.js';
3
- import { i as index$3 } from './index-92355f5d.js';
3
+ import { i as index$3 } from './index-f29f088a.js';
4
4
 
5
5
  declare namespace index {
6
6
  export {
@@ -1,8 +1,8 @@
1
1
  import { getComponentNames } from './name/getComponentNames.js';
2
2
  import { getNames } from './name/getNames.js';
3
3
  import { humpToLine } from './name/humpToLine.js';
4
- import { lineToLargeHump } from './name/lineToLargeHump.js';
5
4
  import { lineToSmallHump } from './name/lineToSmallHump.js';
5
+ import { lineToLargeHump } from './name/lineToLargeHump.js';
6
6
 
7
7
  declare const index_getComponentNames: typeof getComponentNames;
8
8
  declare const index_getNames: typeof getNames;
@@ -1,8 +1,8 @@
1
1
  import { appearNum } from './basic/string/appearNum.js';
2
- import { firstLower } from './basic/string/firstLower.js';
3
2
  import { appearNumSeat } from './basic/string/appearNumSeat.js';
4
3
  import { firstUpper } from './basic/string/firstUpper.js';
5
4
  import { getStartSame } from './basic/string/getStartSame.js';
5
+ import { firstLower } from './basic/string/firstLower.js';
6
6
  import { getStartSames } from './basic/string/getStartSames.js';
7
7
 
8
8
  declare const index_appearNum: typeof appearNum;
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkXCTYN6R4cjs = require('./chunk-XCTYN6R4.cjs');
4
- require('./chunk-R7AVUYCG.cjs');
5
- require('./chunk-IDDTRJG3.cjs');
3
+ var _chunk2OLJQYSOcjs = require('./chunk-2OLJQYSO.cjs');
4
+ require('./chunk-O6GUK5PL.cjs');
5
+ require('./chunk-YK7WI6H7.cjs');
6
6
  require('./chunk-6RIGEV6G.cjs');
7
7
  require('./chunk-DILKJQYV.cjs');
8
8
 
@@ -52,4 +52,4 @@ require('./chunk-5AZGAKWR.cjs');
52
52
 
53
53
 
54
54
 
55
- exports.basic = _chunkFXBQONBUcjs.basic_exports; exports.iss = _chunkN6OX2U6Wcjs.iss_exports; exports.judge = _chunkSYXWQKOOcjs.judge_exports; exports.log = _chunkJ7SPTSZMcjs.log_exports; exports.name = _chunkUL24YTNHcjs.name_exports; exports.urls = _chunkXCTYN6R4cjs.urls_exports;
55
+ exports.basic = _chunkFXBQONBUcjs.basic_exports; exports.iss = _chunkN6OX2U6Wcjs.iss_exports; exports.judge = _chunkSYXWQKOOcjs.judge_exports; exports.log = _chunkJ7SPTSZMcjs.log_exports; exports.name = _chunkUL24YTNHcjs.name_exports; exports.urls = _chunk2OLJQYSOcjs.urls_exports;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { i as basic } from './index-05051263.js';
1
+ export { i as basic } from './index-9e038aa5.js';
2
2
  export { i as iss } from './index-24872dab.js';
3
3
  export { i as judge } from './index-445fe401.js';
4
4
  export { i as log } from './index-ef15848a.js';
5
- export { i as name } from './index-a65f6120.js';
5
+ export { i as name } from './index-dddef964.js';
6
6
  export { i as urls } from './index-d6d3b4d8.js';
7
7
  import './index-6be6487f.js';
8
8
  import './basic/array/isArray.js';
@@ -11,12 +11,12 @@ import './index-3062a21e.js';
11
11
  import './basic/object/isObject.js';
12
12
  import './basic/object/mergeObject.js';
13
13
  import './basic/object/unmergeObject.js';
14
- import './index-92355f5d.js';
14
+ import './index-f29f088a.js';
15
15
  import './basic/string/appearNum.js';
16
- import './basic/string/firstLower.js';
17
16
  import './basic/string/appearNumSeat.js';
18
17
  import './basic/string/firstUpper.js';
19
18
  import './basic/string/getStartSame.js';
19
+ import './basic/string/firstLower.js';
20
20
  import './basic/string/getStartSames.js';
21
21
  import './judge/matchs.js';
22
22
  import './judge/matchsEnd.js';
@@ -26,8 +26,8 @@ import './log/styleLog.js';
26
26
  import './name/getComponentNames.js';
27
27
  import './name/getNames.js';
28
28
  import './name/humpToLine.js';
29
- import './name/lineToLargeHump.js';
30
29
  import './name/lineToSmallHump.js';
30
+ import './name/lineToLargeHump.js';
31
31
  import './urls/getImportUrl.js';
32
32
  import './urls/getImportUrlSuffix.js';
33
33
  import './urls/getReplaceUrl.js';
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  urls_exports
3
- } from "./chunk-LSTQB3AN.js";
4
- import "./chunk-2SR75KDV.js";
5
- import "./chunk-V57XN54Z.js";
3
+ } from "./chunk-BHZVPOGH.js";
4
+ import "./chunk-G6FL4SSB.js";
5
+ import "./chunk-LFC6RYSS.js";
6
6
  import "./chunk-ZRZ5HATA.js";
7
7
  import "./chunk-ZEXHP7HI.js";
8
8
  import {
@@ -1,5 +1,5 @@
1
1
  export { getComponentNames } from './getComponentNames.js';
2
2
  export { getNames } from './getNames.js';
3
3
  export { humpToLine } from './humpToLine.js';
4
- export { lineToLargeHump } from './lineToLargeHump.js';
5
4
  export { lineToSmallHump } from './lineToSmallHump.js';
5
+ export { lineToLargeHump } from './lineToLargeHump.js';
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkIDDTRJG3cjs = require('../chunk-IDDTRJG3.cjs');
3
+ var _chunkYK7WI6H7cjs = require('../chunk-YK7WI6H7.cjs');
4
4
  require('../chunk-PW7RP73J.cjs');
5
5
  require('../chunk-5AZGAKWR.cjs');
6
6
 
7
7
 
8
- exports.getImportUrl = _chunkIDDTRJG3cjs.getImportUrl;
8
+ exports.getImportUrl = _chunkYK7WI6H7cjs.getImportUrl;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getImportUrl
3
- } from "../chunk-V57XN54Z.js";
3
+ } from "../chunk-LFC6RYSS.js";
4
4
  import "../chunk-A276ZDLP.js";
5
5
  import "../chunk-UICA3PK6.js";
6
6
  export {
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkR7AVUYCGcjs = require('../chunk-R7AVUYCG.cjs');
4
- require('../chunk-IDDTRJG3.cjs');
3
+ var _chunkO6GUK5PLcjs = require('../chunk-O6GUK5PL.cjs');
4
+ require('../chunk-YK7WI6H7.cjs');
5
5
  require('../chunk-PW7RP73J.cjs');
6
6
  require('../chunk-5AZGAKWR.cjs');
7
7
 
8
8
 
9
- exports.getImportUrlSuffix = _chunkR7AVUYCGcjs.getImportUrlSuffix;
9
+ exports.getImportUrlSuffix = _chunkO6GUK5PLcjs.getImportUrlSuffix;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getImportUrlSuffix
3
- } from "../chunk-2SR75KDV.js";
4
- import "../chunk-V57XN54Z.js";
3
+ } from "../chunk-G6FL4SSB.js";
4
+ import "../chunk-LFC6RYSS.js";
5
5
  import "../chunk-A276ZDLP.js";
6
6
  import "../chunk-UICA3PK6.js";
7
7
  export {
@@ -0,0 +1,22 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-5AZGAKWR.cjs');
2
+
3
+ // packages/urls/getUrlCatalogueObj.ts
4
+ function getUrlCatalogueObj(str) {
5
+ const reg = /(\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+)$/g;
6
+ const ml = str.replace(reg, "");
7
+ let name = "";
8
+ let suffix = "";
9
+ const arr = reg.exec(str);
10
+ if (arr) {
11
+ name = arr[2];
12
+ suffix = arr[3];
13
+ }
14
+ return {
15
+ catalogue: ml,
16
+ name,
17
+ suffix
18
+ };
19
+ }
20
+
21
+
22
+ exports.getUrlCatalogueObj = getUrlCatalogueObj;
@@ -0,0 +1,13 @@
1
+ interface UrlCatalogue {
2
+ catalogue: string;
3
+ name: string;
4
+ suffix: string;
5
+ }
6
+ /**
7
+ * 去掉文件,获取文件目录
8
+ * @param str
9
+ * @returns
10
+ */
11
+ declare function getUrlCatalogueObj(str: string): UrlCatalogue;
12
+
13
+ export { getUrlCatalogueObj };
@@ -0,0 +1,22 @@
1
+ import "../chunk-UICA3PK6.js";
2
+
3
+ // packages/urls/getUrlCatalogueObj.ts
4
+ function getUrlCatalogueObj(str) {
5
+ const reg = /(\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+)$/g;
6
+ const ml = str.replace(reg, "");
7
+ let name = "";
8
+ let suffix = "";
9
+ const arr = reg.exec(str);
10
+ if (arr) {
11
+ name = arr[2];
12
+ suffix = arr[3];
13
+ }
14
+ return {
15
+ catalogue: ml,
16
+ name,
17
+ suffix
18
+ };
19
+ }
20
+ export {
21
+ getUrlCatalogueObj
22
+ };
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-XCTYN6R4.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-2OLJQYSO.cjs');
2
2
 
3
3
 
4
- var _chunkR7AVUYCGcjs = require('../chunk-R7AVUYCG.cjs');
4
+ var _chunkO6GUK5PLcjs = require('../chunk-O6GUK5PL.cjs');
5
5
 
6
6
 
7
- var _chunkIDDTRJG3cjs = require('../chunk-IDDTRJG3.cjs');
7
+ var _chunkYK7WI6H7cjs = require('../chunk-YK7WI6H7.cjs');
8
8
 
9
9
 
10
10
  var _chunk6RIGEV6Gcjs = require('../chunk-6RIGEV6G.cjs');
@@ -20,4 +20,4 @@ require('../chunk-5AZGAKWR.cjs');
20
20
 
21
21
 
22
22
 
23
- exports.getImportUrl = _chunkIDDTRJG3cjs.getImportUrl; exports.getImportUrlSuffix = _chunkR7AVUYCGcjs.getImportUrlSuffix; exports.getReplaceUrl = _chunk6RIGEV6Gcjs.getReplaceUrl; exports.getUrlCatalogue = _chunkDILKJQYVcjs.getUrlCatalogue;
23
+ exports.getImportUrl = _chunkYK7WI6H7cjs.getImportUrl; exports.getImportUrlSuffix = _chunkO6GUK5PLcjs.getImportUrlSuffix; exports.getReplaceUrl = _chunk6RIGEV6Gcjs.getReplaceUrl; exports.getUrlCatalogue = _chunkDILKJQYVcjs.getUrlCatalogue;
@@ -1,10 +1,10 @@
1
- import "../chunk-LSTQB3AN.js";
1
+ import "../chunk-BHZVPOGH.js";
2
2
  import {
3
3
  getImportUrlSuffix
4
- } from "../chunk-2SR75KDV.js";
4
+ } from "../chunk-G6FL4SSB.js";
5
5
  import {
6
6
  getImportUrl
7
- } from "../chunk-V57XN54Z.js";
7
+ } from "../chunk-LFC6RYSS.js";
8
8
  import {
9
9
  getReplaceUrl
10
10
  } from "../chunk-ZRZ5HATA.js";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fangzhongya/utils",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "0.0.6-3",
5
+ "version": "0.0.6-5",
6
6
  "description ": "个人工具库",
7
7
  "author": "fangzhongya ",
8
8
  "license": "MIT",
@@ -215,9 +215,14 @@
215
215
  "require": "./dist/urls/getUrlCatalogue.cjs",
216
216
  "import": "./dist/urls/getUrlCatalogue.js",
217
217
  "types": "./dist/urls/getUrlCatalogue.d.ts"
218
+ },
219
+ "./urls/getUrlCatalogueObj": {
220
+ "require": "./dist/urls/getUrlCatalogueObj.cjs",
221
+ "import": "./dist/urls/getUrlCatalogueObj.js",
222
+ "types": "./dist/urls/getUrlCatalogueObj.d.ts"
218
223
  }
219
224
  },
220
225
  "main": "./dist/index.cjs",
221
226
  "module": "./dist/index.js",
222
227
  "types": "./dist/index.d.ts"
223
- }
228
+ }