UNPKG

payload-is

Version:

A comprehensive TypeScript/JavaScript type checking library providing functions to check data types, collections, primitives, and built-in objects

11 lines (10 loc) 196 B
// isClasses export function isClasses(fn: Function) { if (fn.prototype === undefined) { return false; } if (fn.toString().startsWith("class ")) { return true; } return false; }