@nickyzj2023/utils 1.0.18 → 1.0.21
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/README.md +35 -35
- package/biome.json +40 -0
- package/dist/index.js +1 -1
- package/dist/is.d.ts +4 -0
- package/dist/network.d.ts +17 -13
- package/dist/object.d.ts +2 -4
- package/dist/string.d.ts +18 -4
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/functions/camelToSnake.html +3 -3
- package/docs/functions/capitalize.html +178 -0
- package/docs/functions/decapitalize.html +178 -0
- package/docs/functions/fetcher.html +9 -8
- package/docs/functions/isFalsy.html +175 -0
- package/docs/functions/isObject.html +1 -1
- package/docs/functions/isPrimitive.html +1 -1
- package/docs/functions/mapKeys.html +1 -1
- package/docs/functions/mapValues.html +1 -1
- package/docs/functions/mergeObjects.html +3 -5
- package/docs/functions/sleep.html +1 -1
- package/docs/functions/snakeToCamel.html +3 -3
- package/docs/functions/timeLog.html +1 -1
- package/docs/functions/to.html +1 -1
- package/docs/functions/withCache.html +3 -3
- package/docs/modules.html +1 -1
- package/docs/types/DeepMapKeys.html +1 -1
- package/docs/types/DeepMapValues.html +1 -1
- package/docs/types/Primitive.html +1 -1
- package/docs/types/RequestInit.html +1 -1
- package/docs/types/SetTtl.html +1 -1
- package/package.json +2 -2
- package/src/dom.ts +10 -10
- package/src/hoc.ts +117 -115
- package/src/index.ts +7 -7
- package/src/is.ts +35 -21
- package/src/lru-cache.ts +50 -50
- package/src/network.ts +120 -111
- package/src/object.ts +163 -165
- package/src/string.ts +42 -22
- package/src/time.ts +11 -11
- package/tsconfig.json +32 -32
package/README.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
男生自用全新前端工具库
|
|
2
|
-
|
|
3
|
-
安装到你的前端项目里:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
# npm
|
|
7
|
-
npm install @nickyzj2023/utils
|
|
8
|
-
|
|
9
|
-
# yarn
|
|
10
|
-
yarn add @nickyzj2023/utils
|
|
11
|
-
|
|
12
|
-
# pnpm
|
|
13
|
-
pnpm add @nickyzj2023/utils
|
|
14
|
-
|
|
15
|
-
# bun
|
|
16
|
-
bun add @nickyzj2023/utils
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
使用方式:
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import { fetcher, to } from "@nickyzj2023/utils";
|
|
23
|
-
|
|
24
|
-
const api = fetcher("https://api.example.com");
|
|
25
|
-
|
|
26
|
-
const [error, data] = await to(api.get<Blog>("/blogs/hello-world"));
|
|
27
|
-
if (error) {
|
|
28
|
-
console.error(error);
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
console.log(data);
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
This project was created using `bun init` in bun v1.3.2. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
|
|
1
|
+
男生自用全新前端工具库
|
|
2
|
+
|
|
3
|
+
安装到你的前端项目里:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# npm
|
|
7
|
+
npm install @nickyzj2023/utils
|
|
8
|
+
|
|
9
|
+
# yarn
|
|
10
|
+
yarn add @nickyzj2023/utils
|
|
11
|
+
|
|
12
|
+
# pnpm
|
|
13
|
+
pnpm add @nickyzj2023/utils
|
|
14
|
+
|
|
15
|
+
# bun
|
|
16
|
+
bun add @nickyzj2023/utils
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
使用方式:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { fetcher, to } from "@nickyzj2023/utils";
|
|
23
|
+
|
|
24
|
+
const api = fetcher("https://api.example.com");
|
|
25
|
+
|
|
26
|
+
const [error, data] = await to(api.get<Blog>("/blogs/hello-world"));
|
|
27
|
+
if (error) {
|
|
28
|
+
console.error(error);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
console.log(data);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This project was created using `bun init` in bun v1.3.2. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
|
package/biome.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
|
|
3
|
+
"vcs": {
|
|
4
|
+
"enabled": true,
|
|
5
|
+
"clientKind": "git",
|
|
6
|
+
"useIgnoreFile": true
|
|
7
|
+
},
|
|
8
|
+
"files": {
|
|
9
|
+
"ignoreUnknown": false
|
|
10
|
+
},
|
|
11
|
+
"formatter": {
|
|
12
|
+
"enabled": true,
|
|
13
|
+
"indentStyle": "tab"
|
|
14
|
+
},
|
|
15
|
+
"linter": {
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"rules": {
|
|
18
|
+
"recommended": true,
|
|
19
|
+
"correctness": {
|
|
20
|
+
"noUnusedVariables": "info"
|
|
21
|
+
},
|
|
22
|
+
"suspicious": {
|
|
23
|
+
"noExplicitAny": "info"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"javascript": {
|
|
28
|
+
"formatter": {
|
|
29
|
+
"quoteStyle": "double"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"assist": {
|
|
33
|
+
"enabled": true,
|
|
34
|
+
"actions": {
|
|
35
|
+
"source": {
|
|
36
|
+
"organizeImports": "on"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var P=(...x)=>{console.log(`${new Date().toLocaleTimeString()}`,...x)};var E=(x,f=-1)=>{let W=new Map,D=(...H)=>{let $=JSON.stringify(H),I=Date.now(),M=W.get($);if(M&&I<M.expiresAt)return M.value;let C=f===-1?1/0:I+f*1000,Q={setTtl:(X)=>{C=I+X*1000}},Y=x.apply(Q,H);if(Y instanceof Promise){let X=Y.then((Z)=>{return W.set($,{value:Z,expiresAt:C}),Z});return W.set($,{value:X,expiresAt:C}),X}return W.set($,{value:Y,expiresAt:C}),Y};return D.clear=()=>W.clear(),D.updateTtl=(H)=>{f=H;let $=Date.now(),I=$+H*1000;for(let[M,C]of W.entries())if(C.expiresAt>$)C.expiresAt=I,W.set(M,C)},D};var J=(x)=>{return x?.constructor===Object},_=(x)=>{return x===null||x===void 0||typeof x!=="object"&&typeof x!=="function"},L=(x)=>{return!x};var z=(x,f)=>{let W={...x};for(let D of Object.keys(f)){let H=W[D],$=f[D];if(_(H)&&_($)){W[D]=$;continue}if(Array.isArray(H)&&Array.isArray($)){W[D]=H.concat($);continue}if(J(H)&&J($)){W[D]=z(H,$);continue}W[D]=$}return W},B=(x,f)=>{if(Array.isArray(x))return x.map((W)=>B(W,f));if(J(x))return Object.keys(x).reduce((D,H)=>{let $=f(H),I=x[H];return D[$]=B(I,f),D},{});return x},G=(x,f)=>{if(Array.isArray(x))return x.map((W,D)=>{if(J(W))return G(W,f);return f(W,D)});if(J(x))return Object.keys(x).reduce((D,H)=>{let $=x[H];if(J($)||Array.isArray($))D[H]=G($,f);else D[H]=f($,H);return D},{});return x};var K=(x="",f={})=>{let W=async(D,H={})=>{let $=new URL(x?`${x}${D}`:D),{params:I,parser:M,...C}=z(f,H);if(J(I))Object.entries(I).forEach(([X,Z])=>{$.searchParams.append(X,Z.toString())});if(J(C.body))C.body=JSON.stringify(C.body),C.headers={...C.headers,"Content-Type":"application/json"};let Q=await fetch($,C);if(!Q.ok)throw Error(Q.statusText);return await(M?.(Q)??Q.json())};return{get:(D,H)=>W(D,{...H,method:"GET"}),post:(D,H,$)=>W(D,{...$,method:"POST",body:H}),put:(D,H,$)=>W(D,{...$,method:"PUT",body:H}),delete:(D,H)=>W(D,{...H,method:"DELETE"})}},V=async(x)=>{try{return[null,await x]}catch(f){return[f,void 0]}};var O=(x)=>{return x.replace(/_([a-zA-Z])/g,(f,W)=>W.toUpperCase())},N=(x)=>{return x.replace(/([A-Z])/g,(f,W)=>`_${W.toLowerCase()}`)},g=(x)=>{return x.charAt(0).toUpperCase()+x.slice(1)},h=(x)=>{return x.charAt(0).toLowerCase()+x.slice(1)};var w=async(x=150)=>{return new Promise((f)=>{setTimeout(f,x)})};export{E as withCache,V as to,P as timeLog,O as snakeToCamel,w as sleep,z as mergeObjects,G as mapValues,B as mapKeys,_ as isPrimitive,J as isObject,L as isFalsy,K as fetcher,h as decapitalize,g as capitalize,N as camelToSnake};
|
package/dist/is.d.ts
CHANGED
|
@@ -9,3 +9,7 @@ export declare const isObject: (value: any) => value is object;
|
|
|
9
9
|
* @returns 如果是原始值,返回 true,否则返回 false
|
|
10
10
|
*/
|
|
11
11
|
export declare const isPrimitive: (value: any) => value is Primitive;
|
|
12
|
+
/**
|
|
13
|
+
* 检测传入的值是否为**false值**(false、0、''、null、undefined、NaN等)
|
|
14
|
+
*/
|
|
15
|
+
export declare const isFalsy: (value: any) => boolean;
|
package/dist/network.d.ts
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
1
|
export type RequestInit = BunFetchRequestInit & {
|
|
2
|
+
params?: Record<string, string>;
|
|
2
3
|
parser?: (response: Response) => Promise<any>;
|
|
3
4
|
};
|
|
4
5
|
/**
|
|
5
6
|
* 基于 Fetch API 的请求客户端
|
|
6
|
-
* @param baseURL
|
|
7
|
-
* @param
|
|
7
|
+
* @param baseURL 接口前缀
|
|
8
|
+
* @param baseOptions 客户端级别的请求体,后续调用时传递相同参数会覆盖上去
|
|
8
9
|
*
|
|
9
10
|
* @remarks
|
|
10
11
|
* 特性:
|
|
11
|
-
* -
|
|
12
|
-
* - 在
|
|
13
|
-
* -
|
|
12
|
+
* - 合并实例、调用时的相同请求体
|
|
13
|
+
* - 在 params 里传递对象,自动转换为 queryString
|
|
14
|
+
* - 在 body 里传递对象,自动 JSON.stringify
|
|
15
|
+
* - 可选择使用 to() 转换请求结果为 [Error, Response]
|
|
14
16
|
* - 可选择使用 withCache() 缓存请求结果
|
|
15
17
|
*
|
|
16
18
|
* @example
|
|
17
|
-
* // 用法1:创建客户端
|
|
18
|
-
* const api = fetcher("https://nickyzj.run:3030", { headers: { Authorization: "Bearer token" } });
|
|
19
|
-
* const res = await api.get<Blog>("/blogs/hello-world");
|
|
20
19
|
*
|
|
21
|
-
* // 用法
|
|
20
|
+
* // 用法1:直接发送请求
|
|
22
21
|
* const res = await fetcher().get<Blog>("https://nickyzj.run:3030/blogs/hello-world");
|
|
23
22
|
*
|
|
24
|
-
* //
|
|
23
|
+
* // 用法2:创建实例
|
|
24
|
+
* const api = fetcher("https://nickyzj.run:3030", { headers: { Authorization: "Bearer token" } });
|
|
25
|
+
* const res = await api.get<Blog>("/blogs/hello-world", { headers: {...}, params: { page: 1 } }); // 与实例相同的 headers 会覆盖上去,params 会转成 ?page=1 跟到 url 后面
|
|
26
|
+
*
|
|
27
|
+
* // 安全处理请求结果
|
|
25
28
|
* const [error, data] = await to(api.get<Blog>("/blogs/hello-world"));
|
|
26
29
|
* if (error) {
|
|
27
30
|
* console.error(error);
|
|
28
31
|
* return;
|
|
29
32
|
* }
|
|
33
|
+
* console.log(data);
|
|
30
34
|
*
|
|
31
35
|
* // 缓存请求结果
|
|
32
36
|
* const getBlogs = withCache(api.get);
|
|
33
37
|
* await getBlogs("/blogs");
|
|
34
|
-
* await sleep(
|
|
35
|
-
* await getBlogs("/blogs"); //
|
|
38
|
+
* await sleep();
|
|
39
|
+
* await getBlogs("/blogs"); // 不发请求,使用缓存
|
|
36
40
|
*/
|
|
37
|
-
export declare const fetcher: (baseURL?: string,
|
|
41
|
+
export declare const fetcher: (baseURL?: string, baseOptions?: RequestInit) => {
|
|
38
42
|
get: <T>(url: string, options?: Omit<RequestInit, "method">) => Promise<T>;
|
|
39
43
|
post: <T>(url: string, body: any, options?: Omit<RequestInit, "method" | "body">) => Promise<T>;
|
|
40
44
|
put: <T>(url: string, body: any, options?: Omit<RequestInit, "method" | "body">) => Promise<T>;
|
package/dist/object.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 深度合并两个对象,规则如下:
|
|
3
|
-
* 1.
|
|
3
|
+
* 1. 原始值覆盖:如果两个值都是原始类型,则用后者覆盖;
|
|
4
4
|
* 2. 数组拼接:如果两个值都是数组,则拼接为大数组;
|
|
5
5
|
* 3. 对象递归合并:如果两个值都是对象,则进行递归深度合并;
|
|
6
|
-
* 4. 类型不匹配覆盖:如果两个值的类型不同,则用后者覆盖;
|
|
7
|
-
* 5. 独有属性保留:如果字段只存在于其中一个对象中,则保留它。
|
|
8
6
|
*
|
|
9
7
|
* @template T 第一个对象
|
|
10
8
|
* @template U 第二个对象
|
|
11
|
-
* @param {T} obj1
|
|
9
|
+
* @param {T} obj1 要合并的第一个对象,相同字段会被 obj2 覆盖
|
|
12
10
|
* @param {U} obj2 要合并的第二个对象
|
|
13
11
|
*/
|
|
14
12
|
export declare const mergeObjects: <T extends Record<string, any>, U extends Record<string, any>>(obj1: T, obj2: U) => T & U;
|
package/dist/string.d.ts
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 下划线命名法转为驼峰命名法
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
|
-
* snakeToCamel("user_name") //
|
|
5
|
+
* snakeToCamel("user_name") // "userName"
|
|
6
6
|
*/
|
|
7
7
|
export declare const snakeToCamel: (str: string) => string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* 驼峰命名法转为下划线命名法
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* camelToSnake("shouldComponentUpdate") //
|
|
12
|
+
* camelToSnake("shouldComponentUpdate") // "should_component_update"
|
|
13
13
|
*/
|
|
14
14
|
export declare const camelToSnake: (str: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* 字符串首字母大写
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* capitalize("hello") // "Hello"
|
|
20
|
+
*/
|
|
21
|
+
export declare const capitalize: (s: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* 字符串首字母小写
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* decapitalize("Hello") // "hello"
|
|
27
|
+
*/
|
|
28
|
+
export declare const decapitalize: (s: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "
|
|
1
|
+
window.navigationData = "eJyFk8FKxDAQQP9lzsXqsirmuiKIiuIWL+Ihdsdt3KSJzVStsv8utQ1sQ5Je83gPhsw8/wLhNwGDS0Rzx80NdhYyMJwqYECdQZs7hJ09qkhJyGAn6g2wxfHF+cnpYp/5lScuW4x1BjhXemiEEiQ+0a84gHOFR/xo0dJ1LchvOFQLmquskQqSfmB4nXNLrlAWel3znRsDGLy1dUlC1zY/5NPW2XKSMYK4FD+RiKOxBDDYYDpyyGOZXkAqK2xChRHFZGAg7BWXtgvJI0rK96/vWFLYHlhS9/fJK0S2ahJR/nm4gM1V6Dx82b+KiR66imkAmy0Og4YbjpeUyliJaEL+P0iJ/ZYWetXvbNB3XKGMZfr7EQpv9TZUGFFK1kFPxxRg8CWoWvGyCv67g/6vL/cvf36huQQ="
|
package/docs/assets/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.searchData = "
|
|
1
|
+
window.searchData = "eJyVl1tv2zgQhf/LeSZi03fztYsFit2ii23QF8EoVHnScKPbinTarOD/XlDkADLBbZi3+IzOZ5A+MxmNGLrvBqoY8aTbM9RqedzL7UqgLRuCwm9E/Yey/4NeDAQuQw0F+9KTWXCFXszdo21qCFR1aQwZKOAqXiF+LusL/Q/T195E/WvQjbb6mSIi6/Qm2t/074WMfd9qG/G40mr7JuInsve2jmBe/CVnt2EEqrKh+r771JZPfEqFh0tbWd21ZjEv5yKrste2rPV/aSAXc3Fn+iVwXs5FPpCtHmmIaa1ZhEouSJvfy9q8xKDWLEIlF6TNx6//UGWTJF/KRWkTx/aWlhdeBkKhiTqVYWbRvNapMShu0BvUaw0awWj4Rv5mkjwuVzYXCVMT9TGrNYtJz4UY1yr33TvXOCkWlxvK7VFY3dCf3beY1ppFqOSCbJdidLn279o+viurx1SuuJZM1UlAt2f6ATXimQajuxYKq7v13RECD5rqs/t34b9HoOqahlrXC+euukx/nsJjn6my3eAe9k8vlhDFUqx2d+ujPJ1EweapMAnMYCUYJUQhU0YZG1kJxhVEsUoZV7GRlWBcQxTrlHEdG1kJxg1EsUkZN7GRlWDcQhTblHEbG1kJxh1EsUsZd7GRlWDcQxT7lHEfG1kJxgNEcUgZD7GRlWA8QhTHlPEYG1nhALg8yGR2ZByeueTNU3zS+YkDNJe82eVCJjMk4xDNJW922ZDJHMk4SHPJm10+ZDJLMg7TXPJmlxGZzJOMAzWXvNnlRCYzJeNQzSVvdlmRyVzJOFhzyZtdXmQyWzIO11zyZpcZmcyXjAPG0mkad880WDq/92OvKPyiZTvjF60RX8JE3PJ4HbGFGq9Xnn/WfeIR6D9dp+/ndecGs2PMiF0W5natYhDUnkEj9pkg6puyf5pWBOZALZkzYvkWznPYEJgEJZk0QmaReL1jxg+oAzNGHLIY2jz4zY4ZUEdmjDhmMrqw1DEESvK9uNPkXYw2Pa9sN6T5veRdTPwzOQq/TTjKKpcS/0hQcs2cEXKdx3ErWscbHKOgJG8cDrXJQiUviE+mRuQdbPCvYXp6QWMOFJ9Mjcg7mCFr3WsZI6D4RGpE3oHCKsoEKMlzwl1K3qCYRo3tKr+JMgpK8qxwqLxh4fbM2m2gTIGSPCgcJW9SuPWTAVCSe9IB8prSLZmVX0CZAyW5Lx3ntca8Xt107nVPtW4Jqjhdrz8BqBhdwA==";
|
|
@@ -156,11 +156,11 @@
|
|
|
156
156
|
--md-sys-color-surface-container-high: #efe7de;
|
|
157
157
|
--md-sys-color-surface-container-highest: #e9e1d9
|
|
158
158
|
}
|
|
159
|
-
</style><link rel="stylesheet" href="../assets/material-style.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@nickyzj2023/utils</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">camelToSnake</a></li></ul><h1>Function camelToSnake</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="cameltosnake"><span class="tsd-kind-call-signature">camelToSnake</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#cameltosnake" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p
|
|
160
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">str</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">camelToSnake</span><span class="hl-2">(</span><span class="hl-3">"shouldComponentUpdate"</span><span class="hl-2">) </span><span class="hl-0">//
|
|
159
|
+
</style><link rel="stylesheet" href="../assets/material-style.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@nickyzj2023/utils</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">camelToSnake</a></li></ul><h1>Function camelToSnake</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="cameltosnake"><span class="tsd-kind-call-signature">camelToSnake</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#cameltosnake" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>驼峰命名法转为下划线命名法</p>
|
|
160
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">str</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">camelToSnake</span><span class="hl-2">(</span><span class="hl-3">"shouldComponentUpdate"</span><span class="hl-2">) </span><span class="hl-0">// "should_component_update"</span>
|
|
161
161
|
</code><button type="button">Copy</button></pre>
|
|
162
162
|
|
|
163
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Nickyzj628/utils/blob/
|
|
163
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Nickyzj628/utils/blob/e5e476cb93967b9ae82cf015958ed646d7b8ddef/src/string.ts#L17">string.ts:17</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@nickyzj2023/utils</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div><script>
|
|
164
164
|
try {
|
|
165
165
|
const generateLinkElement = document.querySelector(".tsd-generator a");
|
|
166
166
|
const link = document.createElement("a");
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>capitalize | @nickyzj2023/utils</title><meta name="description" content="Documentation for @nickyzj2023/utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><style>
|
|
2
|
+
@media (prefers-color-scheme: dark) {
|
|
3
|
+
:root {
|
|
4
|
+
--md-sys-color-primary: #f6be46;
|
|
5
|
+
--md-sys-color-on-primary: #412d00;
|
|
6
|
+
--md-sys-color-primary-container: #5d4200;
|
|
7
|
+
--md-sys-color-on-primary-container: #ffdea3;
|
|
8
|
+
--md-sys-color-secondary: #d9c4a0;
|
|
9
|
+
--md-sys-color-on-secondary: #3b2f15;
|
|
10
|
+
--md-sys-color-secondary-container: #53452a;
|
|
11
|
+
--md-sys-color-on-secondary-container: #f6e0bb;
|
|
12
|
+
--md-sys-color-tertiary: #b2cfa8;
|
|
13
|
+
--md-sys-color-on-tertiary: #1e361a;
|
|
14
|
+
--md-sys-color-tertiary-container: #344d2f;
|
|
15
|
+
--md-sys-color-on-tertiary-container: #cdebc2;
|
|
16
|
+
--md-sys-color-error: #ffb4ab;
|
|
17
|
+
--md-sys-color-on-error: #690005;
|
|
18
|
+
--md-sys-color-error-container: #93000a;
|
|
19
|
+
--md-sys-color-on-error-container: #ffb4ab;
|
|
20
|
+
--md-sys-color-background: #1e1b16;
|
|
21
|
+
--md-sys-color-on-background: #e9e1d9;
|
|
22
|
+
--md-sys-color-surface: #1e1b16;
|
|
23
|
+
--md-sys-color-on-surface: #e9e1d9;
|
|
24
|
+
--md-sys-color-surface-variant: #4e4639;
|
|
25
|
+
--md-sys-color-on-surface-variant: #d1c5b4;
|
|
26
|
+
--md-sys-color-outline: #9a8f80;
|
|
27
|
+
--md-sys-color-outline-variant: #4e4639;
|
|
28
|
+
--md-sys-color-shadow: #000000;
|
|
29
|
+
--md-sys-color-scrim: #000000;
|
|
30
|
+
--md-sys-color-inverse-surface: #e9e1d9;
|
|
31
|
+
--md-sys-color-inverse-on-surface: #34302a;
|
|
32
|
+
--md-sys-color-inverse-primary: #7a5900;
|
|
33
|
+
--md-sys-color-surface-dim: #16130e;
|
|
34
|
+
--md-sys-color-surface-bright: #3d3933;
|
|
35
|
+
--md-sys-color-surface-container-lowest: #110e09;
|
|
36
|
+
--md-sys-color-surface-container-low: #1e1b16;
|
|
37
|
+
--md-sys-color-surface-container: #221f1a;
|
|
38
|
+
--md-sys-color-surface-container-high: #2d2924;
|
|
39
|
+
--md-sys-color-surface-container-highest: #38342e
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
:root[data-theme="dark"] {
|
|
43
|
+
--md-sys-color-primary: #f6be46;
|
|
44
|
+
--md-sys-color-on-primary: #412d00;
|
|
45
|
+
--md-sys-color-primary-container: #5d4200;
|
|
46
|
+
--md-sys-color-on-primary-container: #ffdea3;
|
|
47
|
+
--md-sys-color-secondary: #d9c4a0;
|
|
48
|
+
--md-sys-color-on-secondary: #3b2f15;
|
|
49
|
+
--md-sys-color-secondary-container: #53452a;
|
|
50
|
+
--md-sys-color-on-secondary-container: #f6e0bb;
|
|
51
|
+
--md-sys-color-tertiary: #b2cfa8;
|
|
52
|
+
--md-sys-color-on-tertiary: #1e361a;
|
|
53
|
+
--md-sys-color-tertiary-container: #344d2f;
|
|
54
|
+
--md-sys-color-on-tertiary-container: #cdebc2;
|
|
55
|
+
--md-sys-color-error: #ffb4ab;
|
|
56
|
+
--md-sys-color-on-error: #690005;
|
|
57
|
+
--md-sys-color-error-container: #93000a;
|
|
58
|
+
--md-sys-color-on-error-container: #ffb4ab;
|
|
59
|
+
--md-sys-color-background: #1e1b16;
|
|
60
|
+
--md-sys-color-on-background: #e9e1d9;
|
|
61
|
+
--md-sys-color-surface: #1e1b16;
|
|
62
|
+
--md-sys-color-on-surface: #e9e1d9;
|
|
63
|
+
--md-sys-color-surface-variant: #4e4639;
|
|
64
|
+
--md-sys-color-on-surface-variant: #d1c5b4;
|
|
65
|
+
--md-sys-color-outline: #9a8f80;
|
|
66
|
+
--md-sys-color-outline-variant: #4e4639;
|
|
67
|
+
--md-sys-color-shadow: #000000;
|
|
68
|
+
--md-sys-color-scrim: #000000;
|
|
69
|
+
--md-sys-color-inverse-surface: #e9e1d9;
|
|
70
|
+
--md-sys-color-inverse-on-surface: #34302a;
|
|
71
|
+
--md-sys-color-inverse-primary: #7a5900;
|
|
72
|
+
--md-sys-color-surface-dim: #16130e;
|
|
73
|
+
--md-sys-color-surface-bright: #3d3933;
|
|
74
|
+
--md-sys-color-surface-container-lowest: #110e09;
|
|
75
|
+
--md-sys-color-surface-container-low: #1e1b16;
|
|
76
|
+
--md-sys-color-surface-container: #221f1a;
|
|
77
|
+
--md-sys-color-surface-container-high: #2d2924;
|
|
78
|
+
--md-sys-color-surface-container-highest: #38342e
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (prefers-color-scheme: light) {
|
|
82
|
+
:root {
|
|
83
|
+
--md-sys-color-primary: #7a5900;
|
|
84
|
+
--md-sys-color-on-primary: #ffffff;
|
|
85
|
+
--md-sys-color-primary-container: #ffdea3;
|
|
86
|
+
--md-sys-color-on-primary-container: #261900;
|
|
87
|
+
--md-sys-color-secondary: #6c5c3f;
|
|
88
|
+
--md-sys-color-on-secondary: #ffffff;
|
|
89
|
+
--md-sys-color-secondary-container: #f6e0bb;
|
|
90
|
+
--md-sys-color-on-secondary-container: #251a04;
|
|
91
|
+
--md-sys-color-tertiary: #4b6545;
|
|
92
|
+
--md-sys-color-on-tertiary: #ffffff;
|
|
93
|
+
--md-sys-color-tertiary-container: #cdebc2;
|
|
94
|
+
--md-sys-color-on-tertiary-container: #092007;
|
|
95
|
+
--md-sys-color-error: #ba1a1a;
|
|
96
|
+
--md-sys-color-on-error: #ffffff;
|
|
97
|
+
--md-sys-color-error-container: #ffdad6;
|
|
98
|
+
--md-sys-color-on-error-container: #410002;
|
|
99
|
+
--md-sys-color-background: #fffbff;
|
|
100
|
+
--md-sys-color-on-background: #1e1b16;
|
|
101
|
+
--md-sys-color-surface: #fffbff;
|
|
102
|
+
--md-sys-color-on-surface: #1e1b16;
|
|
103
|
+
--md-sys-color-surface-variant: #ede1cf;
|
|
104
|
+
--md-sys-color-on-surface-variant: #4e4639;
|
|
105
|
+
--md-sys-color-outline: #7f7667;
|
|
106
|
+
--md-sys-color-outline-variant: #d1c5b4;
|
|
107
|
+
--md-sys-color-shadow: #000000;
|
|
108
|
+
--md-sys-color-scrim: #000000;
|
|
109
|
+
--md-sys-color-inverse-surface: #34302a;
|
|
110
|
+
--md-sys-color-inverse-on-surface: #f8efe7;
|
|
111
|
+
--md-sys-color-inverse-primary: #f6be46;
|
|
112
|
+
--md-sys-color-surface-dim: #e1d9d0;
|
|
113
|
+
--md-sys-color-surface-bright: #fff8f2;
|
|
114
|
+
--md-sys-color-surface-container-lowest: #ffffff;
|
|
115
|
+
--md-sys-color-surface-container-low: #fbf2e9;
|
|
116
|
+
--md-sys-color-surface-container: #f5ede4;
|
|
117
|
+
--md-sys-color-surface-container-high: #efe7de;
|
|
118
|
+
--md-sys-color-surface-container-highest: #e9e1d9
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
:root[data-theme="light"] {
|
|
122
|
+
--md-sys-color-primary: #7a5900;
|
|
123
|
+
--md-sys-color-on-primary: #ffffff;
|
|
124
|
+
--md-sys-color-primary-container: #ffdea3;
|
|
125
|
+
--md-sys-color-on-primary-container: #261900;
|
|
126
|
+
--md-sys-color-secondary: #6c5c3f;
|
|
127
|
+
--md-sys-color-on-secondary: #ffffff;
|
|
128
|
+
--md-sys-color-secondary-container: #f6e0bb;
|
|
129
|
+
--md-sys-color-on-secondary-container: #251a04;
|
|
130
|
+
--md-sys-color-tertiary: #4b6545;
|
|
131
|
+
--md-sys-color-on-tertiary: #ffffff;
|
|
132
|
+
--md-sys-color-tertiary-container: #cdebc2;
|
|
133
|
+
--md-sys-color-on-tertiary-container: #092007;
|
|
134
|
+
--md-sys-color-error: #ba1a1a;
|
|
135
|
+
--md-sys-color-on-error: #ffffff;
|
|
136
|
+
--md-sys-color-error-container: #ffdad6;
|
|
137
|
+
--md-sys-color-on-error-container: #410002;
|
|
138
|
+
--md-sys-color-background: #fffbff;
|
|
139
|
+
--md-sys-color-on-background: #1e1b16;
|
|
140
|
+
--md-sys-color-surface: #fffbff;
|
|
141
|
+
--md-sys-color-on-surface: #1e1b16;
|
|
142
|
+
--md-sys-color-surface-variant: #ede1cf;
|
|
143
|
+
--md-sys-color-on-surface-variant: #4e4639;
|
|
144
|
+
--md-sys-color-outline: #7f7667;
|
|
145
|
+
--md-sys-color-outline-variant: #d1c5b4;
|
|
146
|
+
--md-sys-color-shadow: #000000;
|
|
147
|
+
--md-sys-color-scrim: #000000;
|
|
148
|
+
--md-sys-color-inverse-surface: #34302a;
|
|
149
|
+
--md-sys-color-inverse-on-surface: #f8efe7;
|
|
150
|
+
--md-sys-color-inverse-primary: #f6be46;
|
|
151
|
+
--md-sys-color-surface-dim: #e1d9d0;
|
|
152
|
+
--md-sys-color-surface-bright: #fff8f2;
|
|
153
|
+
--md-sys-color-surface-container-lowest: #ffffff;
|
|
154
|
+
--md-sys-color-surface-container-low: #fbf2e9;
|
|
155
|
+
--md-sys-color-surface-container: #f5ede4;
|
|
156
|
+
--md-sys-color-surface-container-high: #efe7de;
|
|
157
|
+
--md-sys-color-surface-container-highest: #e9e1d9
|
|
158
|
+
}
|
|
159
|
+
</style><link rel="stylesheet" href="../assets/material-style.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@nickyzj2023/utils</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">capitalize</a></li></ul><h1>Function capitalize</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="capitalize"><span class="tsd-kind-call-signature">capitalize</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">s</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#capitalize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>字符串首字母大写</p>
|
|
160
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">s</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">capitalize</span><span class="hl-2">(</span><span class="hl-3">"hello"</span><span class="hl-2">) </span><span class="hl-0">// "Hello"</span>
|
|
161
|
+
</code><button type="button">Copy</button></pre>
|
|
162
|
+
|
|
163
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Nickyzj628/utils/blob/e5e476cb93967b9ae82cf015958ed646d7b8ddef/src/string.ts#L30">string.ts:30</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@nickyzj2023/utils</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div><script>
|
|
164
|
+
try {
|
|
165
|
+
const generateLinkElement = document.querySelector(".tsd-generator a");
|
|
166
|
+
const link = document.createElement("a");
|
|
167
|
+
Object.assign(link, {
|
|
168
|
+
href: "https://github.com/dmnsgn/typedoc-material-theme",
|
|
169
|
+
target: "_blank",
|
|
170
|
+
rel: "noreferrer",
|
|
171
|
+
innerText: "typedoc-material-theme."
|
|
172
|
+
});
|
|
173
|
+
generateLinkElement.insertAdjacentElement("afterend", link);
|
|
174
|
+
generateLinkElement.insertAdjacentText("afterend", " with ");
|
|
175
|
+
} catch (error) {
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
</script></body></html>
|