mirror of
https://github.com/certd/certd.git
synced 2026-05-15 20:47:31 +08:00
chore: ipv6支持
This commit is contained in:
@@ -3,7 +3,7 @@ import * as sites from "./util.site";
|
||||
import * as storages from "./util.storage";
|
||||
import commons from "./util.common";
|
||||
import * as mitt from "./util.mitt";
|
||||
import router from "/util.router";
|
||||
import { routerUtils } from "./util.router";
|
||||
import { treeUtils } from "./util.tree";
|
||||
export const util = {
|
||||
...envs,
|
||||
@@ -11,6 +11,6 @@ export const util = {
|
||||
...storages,
|
||||
...commons,
|
||||
...mitt,
|
||||
...router,
|
||||
router: routerUtils,
|
||||
tree: treeUtils
|
||||
};
|
||||
|
||||
@@ -33,5 +33,12 @@ export default {
|
||||
|
||||
async sleep(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
},
|
||||
|
||||
maxLength(str?: string, length = 100) {
|
||||
if (str) {
|
||||
return str.length > length ? str.slice(0, length) + "..." : str;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user