@base-web-kits/base-tools-ts 0.0.8 → 0.8.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/dist/lodash/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ts/lodash/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ts/lodash/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,WAAW,CAAC"}
|
package/dist/string/random.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 获取url的查询参数值
|
|
3
|
-
*
|
|
3
|
+
* - 采用纯JS解析,因为小程序不支持URLSearchParams
|
|
4
4
|
* @param key 参数名
|
|
5
5
|
* @param url 完整 URL 或仅查询串(如 "a=1&b=2")
|
|
6
6
|
* @returns 解码后的参数值 (若不存在|"null"|"undefined",则返回 null)
|
|
@@ -26,7 +26,7 @@ export declare function getUrlParam(key: string, url: string): string | null;
|
|
|
26
26
|
export declare function getUrlNumber(key: string, url: string): number | null;
|
|
27
27
|
/**
|
|
28
28
|
* 获取url的所有查询参数值
|
|
29
|
-
*
|
|
29
|
+
* - 采用纯JS解析,因为小程序不支持URLSearchParams
|
|
30
30
|
* @param url 完整 URL 或仅查询串(如 "a=1&b=2")
|
|
31
31
|
* @returns 解码后的键值对象(无参数返回空对象; "null"|"undefined"的参数会被忽略)
|
|
32
32
|
* @example
|
|
@@ -38,7 +38,7 @@ export declare function getUrlNumber(key: string, url: string): number | null;
|
|
|
38
38
|
export declare function getUrlParamAll(url: string): Record<string, string>;
|
|
39
39
|
/**
|
|
40
40
|
* 将对象参数拼接到 URL
|
|
41
|
-
*
|
|
41
|
+
* - 采用纯JS拼接,因为小程序不支持URLSearchParams
|
|
42
42
|
* @param url 基础地址
|
|
43
43
|
* @param param 将要追加的参数对象;`null/undefined` 值会被忽略,Object 会使用 `JSON.stringify`
|
|
44
44
|
* @returns 拼接后的完整 URL(保留原有哈希片段)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base-web-kits/base-tools-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Independent TS utilities package built from src/ts.",
|
|
@@ -11,10 +11,23 @@
|
|
|
11
11
|
"thin-wrapper"
|
|
12
12
|
],
|
|
13
13
|
"license": "MIT",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"module": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
14
17
|
"exports": {
|
|
15
18
|
".": {
|
|
16
19
|
"types": "./dist/index.d.ts",
|
|
17
|
-
"import": "./dist/index.js"
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"require": "./dist/index.js",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"typesVersions": {
|
|
27
|
+
"*": {
|
|
28
|
+
"*": [
|
|
29
|
+
"./dist/*"
|
|
30
|
+
]
|
|
18
31
|
}
|
|
19
32
|
},
|
|
20
33
|
"files": [
|