mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-03 04:18:16 +03:00
8 lines
212 B
TypeScript
8 lines
212 B
TypeScript
/**
|
|
* Determines whether an input is a record or not.
|
|
*
|
|
* I hate JS.
|
|
*/
|
|
export function IsRecord<T = string>(v: unknown): v is Record<string, T> {
|
|
return !!v && typeof v === "object" && !Array.isArray(v);
|
|
} |