mirror of
https://github.com/SikongJueluo/cc-utils.git
synced 2025-11-05 03:37:50 +08:00
reconstruct: - move queue and sortedarray to dir datatype - move semaphore and readwritelock to dir mutex - reconstruct autocraft search algorithm, use hashmap instead of forloop - adjust some code style feature: - add rust-style result lib
12 lines
232 B
TypeScript
12 lines
232 B
TypeScript
export function toString(val: unknown): string {
|
|
let value = String(val);
|
|
if (value === "[object Object]") {
|
|
try {
|
|
value = textutils.serialize(val as object);
|
|
} catch {
|
|
return "";
|
|
}
|
|
}
|
|
return value;
|
|
}
|