d3b92593d5
- Create Axios-based API client with sources, jobs, and dashboard endpoints - Add responsive Layout component with navigation sidebar - Set up React Router with Dashboard, Backups, and Settings routes - Configure TanStack Query provider with default options - Use lucide-react for navigation icons
19 lines
597 B
JavaScript
19 lines
597 B
JavaScript
import getFuncName from 'get-func-name'
|
|
import inspectObject from './object'
|
|
|
|
const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false
|
|
|
|
export default function inspectClass(value, options) {
|
|
let name = ''
|
|
if (toStringTag && toStringTag in value) {
|
|
name = value[toStringTag]
|
|
}
|
|
name = name || getFuncName(value.constructor)
|
|
// Babel transforms anonymous classes to the name `_class`
|
|
if (!name || name === '_class') {
|
|
name = '<Anonymous Class>'
|
|
}
|
|
options.truncate -= name.length
|
|
return `${name}${inspectObject(value, options)}`
|
|
}
|