source dump of claude code
at main 20 lines 383 B view raw
1import wrapAnsiNpm from 'wrap-ansi' 2 3type WrapAnsiOptions = { 4 hard?: boolean 5 wordWrap?: boolean 6 trim?: boolean 7} 8 9const wrapAnsiBun = 10 typeof Bun !== 'undefined' && typeof Bun.wrapAnsi === 'function' 11 ? Bun.wrapAnsi 12 : null 13 14const wrapAnsi: ( 15 input: string, 16 columns: number, 17 options?: WrapAnsiOptions, 18) => string = wrapAnsiBun ?? wrapAnsiNpm 19 20export { wrapAnsi }