import inspectObject from "./object.js";

//#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js
const toStringTag = typeof Symbol !== "undefined" && Symbol.toStringTag ? Symbol.toStringTag : false;
function inspectClass(value, options) {
	let name = "";
	if (toStringTag && toStringTag in value) name = value[toStringTag];
	name = name || value.constructor.name;
	if (!name || name === "_class") name = "<Anonymous Class>";
	options.truncate -= name.length;
	return `${name}${inspectObject(value, options)}`;
}

//#endregion
export { inspectClass as default };