mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
refactor: utils structure
This commit is contained in:
parent
4c6bd3df0b
commit
911841401a
@ -1,4 +1,4 @@
|
|||||||
function truncateString(obj: any, maxLength = 500) {
|
export function truncateString(obj: any, maxLength = 500) {
|
||||||
if (obj !== null && typeof obj === 'object') {
|
if (obj !== null && typeof obj === 'object') {
|
||||||
Object.keys(obj).forEach(key => {
|
Object.keys(obj).forEach(key => {
|
||||||
if (typeof obj[key] === 'string') {
|
if (typeof obj[key] === 'string') {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {selfInfo} from "../data";
|
import {selfInfo} from "../data";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import {DATA_DIR} from "./index";
|
import {DATA_DIR, truncateString} from "./index";
|
||||||
import {getConfigUtil} from "../config";
|
import {getConfigUtil} from "../config";
|
||||||
|
|
||||||
export function log(...msg: any[]) {
|
export function log(...msg: any[]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user