Skip to main content

getConstructorName

Get constructor name of an instance.

API

function getConstructorName(instance: any): string;

Example

import { EventEmitter, getConstructorName } from "@lilib/utils";

const emitter = new EventEmitter();

console.log(getConstructorName(emitter));
// => "EventEmitter"