UNPKG

optimizeit

Version:

OptimizeIt is a command-line tool that automatically optimizes source code for performance and readability, supporting multiple programming languages and configurable settings.

14 lines (13 loc) 611 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Handle the token usage information flag and returns the true or false state, * that use to provide token information on completion. * @param {string[]} args - The arguments passed to the CLI. * @param {boolean} tokenConfig - The token usage flag from the config file. * @returns {boolean} True if the token usage flag is present, otherwise false. */ function handleTokenFlag(args, tokenConfig = false) { return args.includes('--token-usage') || args.includes('-u') || tokenConfig; } exports.default = handleTokenFlag;