Files
brk/website_next/learn/charts/units.js
T
2026-06-09 11:26:14 +02:00

14 lines
648 B
JavaScript

import { formatNumberValue, formatPercentValue } from "./format.js";
export const units = /** @type {const} */ ({
addresses: { id: "addresses", name: "Addresses", format: formatNumberValue },
blocks: { id: "blocks", name: "Blocks", format: formatNumberValue },
btc: { id: "btc", name: "Bitcoin", format: formatNumberValue },
percent: { id: "%", name: "Percent", format: formatPercentValue },
utxos: { id: "utxos", name: "UTXOs", format: formatNumberValue },
usd: { id: "usd", name: "US Dollars", format: formatNumberValue },
});
/** @typedef {keyof typeof units} ChartUnitKey */
/** @typedef {typeof units[ChartUnitKey]} ChartUnit */