claude-statusline-powerline
Version:
Beautiful powerline-style statusline for Claude Code with git integration, session tracking, and cost monitoring
21 lines • 611 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.format_tokens = format_tokens;
/**
* Utility function for formatting token counts in a human-readable way
*
* @param tokens - The number of tokens to format
* @returns Formatted string (e.g., "499", "1.5k", "2.3M")
*/
function format_tokens(tokens) {
if (tokens >= 1000000) {
return `${(tokens / 1000000).toFixed(1)}M`;
}
else if (tokens >= 1000) {
return `${(tokens / 1000).toFixed(1)}k`;
}
else {
return tokens.toString();
}
}
//# sourceMappingURL=token-formatting.js.map