@lijuhong1981/jstext 1.0.0 → 1.0.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.
package/index.js CHANGED
@@ -1,13 +1,9 @@
1
- import extractBaseUrl from "./src/extractBaseUrl";
2
- import extractFileName from "./src/extractFileName";
3
1
  import extractNumber from "./src/extractNumber";
4
2
  import formatAreaString from "./src/formatAreaString";
5
3
  import formatDistanceString from "./src/formatDistanceString";
6
4
  import formatVolumeString from "./src/formatVolumeString";
7
5
 
8
6
  export {
9
- extractBaseUrl,
10
- extractFileName,
11
7
  extractNumber,
12
8
  formatAreaString,
13
9
  formatDistanceString,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lijuhong1981/jstext",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -1,12 +0,0 @@
1
- /**
2
- * 从url中提取baseUrl
3
- * @param {String} url 传入的url
4
- * @returns {String} 提取的baseUrl
5
- */
6
- function extractBaseUrl(url) {
7
- const index = url.lastIndexOf('/');
8
- if (index === -1) return './';
9
- return url.substring(0, index);
10
- }
11
-
12
- export default extractBaseUrl;
@@ -1,17 +0,0 @@
1
- /**
2
- * 从url中提取文件名
3
- * @param {String} url 传入的url
4
- * @returns {String} 提取的文件名
5
- */
6
- function extractFileName(url) {
7
- let index = url.lastIndexOf('/');
8
- if (index === -1)
9
- return url;
10
- let name = url.substring(index + 1);
11
- index = name.lastIndexOf('?');
12
- if (index > 0)
13
- name = name.substring(0, index - 1);
14
- return name;
15
- };
16
-
17
- export default extractFileName;