index.mjs 309 B

1234567891011121314
  1. // Bootstrap cliui with CommonJS dependencies:
  2. import { cliui } from './build/lib/index.js'
  3. import { wrap, stripAnsi } from './build/lib/string-utils.js'
  4. export default function ui (opts) {
  5. return cliui(opts, {
  6. stringWidth: (str) => {
  7. return [...str].length
  8. },
  9. stripAnsi,
  10. wrap
  11. })
  12. }