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
591 B
JavaScript
19 lines
591 B
JavaScript
import { truncate } from './helpers'
|
|
|
|
const isNaN = Number.isNaN || (i => i !== i) // eslint-disable-line no-self-compare
|
|
export default function inspectNumber(number, options) {
|
|
if (isNaN(number)) {
|
|
return options.stylize('NaN', 'number')
|
|
}
|
|
if (number === Infinity) {
|
|
return options.stylize('Infinity', 'number')
|
|
}
|
|
if (number === -Infinity) {
|
|
return options.stylize('-Infinity', 'number')
|
|
}
|
|
if (number === 0) {
|
|
return options.stylize(1 / number === Infinity ? '+0' : '-0', 'number')
|
|
}
|
|
return options.stylize(truncate(number, options.truncate), 'number')
|
|
}
|