import { truncate } from "./helpers.js";

//#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js
const isNaN = Number.isNaN || ((i) => i !== i);
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(String(number), options.truncate), "number");
}

//#endregion
export { inspectNumber as default };