@visulima/ansi
Version:
ANSI escape codes for some terminal swag.
2 lines (1 loc) • 399 B
JavaScript
import{ST as e,DCS as h,ESC as s}from"./constants.js";const E=0,g=768,S=(t,r=E)=>{let n=h;if(r>0&&t.length>r)for(let o=0;o<t.length;o+=r){const l=Math.min(o+r,t.length);n+=t.slice(o,l),l<t.length&&(n+=e+h)}else n+=t;return n+=e,n},a=t=>{const r=t.replaceAll(s,s+s);return`${h}tmux;${r}${e}`};export{E as SCREEN_MAX_LEN_DEFAULT,g as SCREEN_TYPICAL_LIMIT,S as screenPassthrough,a as tmuxPassthrough};