openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
17 lines (16 loc) • 400 B
JavaScript
//#region src/infra/inline-option-token.ts
/** Splits one CLI-style option token into its flag name and optional inline value. */
function parseInlineOptionToken(e) {
const t = e.indexOf("=");
if (t < 0) return {
name: e,
hasInlineValue: false
};
return {
name: e.slice(0, t),
hasInlineValue: true,
inlineValue: e.slice(t + 1)
};
}
//#endregion
export { parseInlineOptionToken as t };