init
This commit is contained in:
commit
ec53fcbe95
1905 changed files with 513762 additions and 0 deletions
20
ink/wrapAnsi.ts
Normal file
20
ink/wrapAnsi.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import wrapAnsiNpm from 'wrap-ansi'
|
||||
|
||||
type WrapAnsiOptions = {
|
||||
hard?: boolean
|
||||
wordWrap?: boolean
|
||||
trim?: boolean
|
||||
}
|
||||
|
||||
const wrapAnsiBun =
|
||||
typeof Bun !== 'undefined' && typeof Bun.wrapAnsi === 'function'
|
||||
? Bun.wrapAnsi
|
||||
: null
|
||||
|
||||
const wrapAnsi: (
|
||||
input: string,
|
||||
columns: number,
|
||||
options?: WrapAnsiOptions,
|
||||
) => string = wrapAnsiBun ?? wrapAnsiNpm
|
||||
|
||||
export { wrapAnsi }
|
||||
Loading…
Add table
Add a link
Reference in a new issue