index.mjs 309 B

12345678910111213
  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. }