@visulima/string
Version:
Functions for manipulating strings.
2 lines (1 loc) • 2.88 kB
JavaScript
var u=Object.defineProperty;var R=(E,a)=>u(E,"name",{value:a,configurable:!0});var _=Object.defineProperty,r=R((E,a)=>_(E,"name",{value:a,configurable:!0}),"E");const p=String.raw,e=p`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,n=r(()=>new RegExp(p`\p{RI}{2}|(?)${e}(?:\u200D${e})*`,"gu"),"default");var A=Object.defineProperty,S=R((E,a)=>A(E,"name",{value:a,configurable:!0}),"p");const g=new Set(["\x1B",""]),i="\x07",t="[",c="m",s="]8;;",T=39,L=/[\u200B\uFEFF\u2060-\u2064]/g,w=new RegExp(`(?:\\${t}(?<code>\\d+)m|\\${s}(?<uri>.*)${i})`),x=Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]])),B=/^[ \t]*(?:\r\n|\r|\n)/,O=/(?:\r\n|\r|\n)[ \t]*$/,H=/^(?:[\r\n]|$)/,o=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,C=/^[ \t]*[\r\n][ \t\r\n]*$/,G=/\r\n|\n|\r/g,M=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,l=/\u001B\[(\d+(?:;\d+)*)?m[^\u001B]*(?:\u001B\[(?:\d+(?:;\d+)*)?m|$)/g,d=/\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)(.*?)\u001B\]8;;(?:\u0007|\u001B\\)/g,m=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,I=n(),D=/[-_./\s]+/g,K=/(\u001B\[[0-9;]*[a-z])/i,P=new RegExp("\\p{Script=Arabic}","u"),F=new RegExp("\\p{Script=Bengali}","u"),$=new RegExp("\\p{Script=Cyrillic}","u"),W=new RegExp("\\p{Script=Devanagari}","u"),b=new RegExp("\\p{Script=Ethiopic}","u"),y=new RegExp("\\p{Script=Greek}","u"),f=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),j=new RegExp("\\p{Script=Gujarati}","u"),v=new RegExp("\\p{Script=Gurmukhi}","u"),U=new RegExp("\\p{Script=Hangul}","u"),Y=new RegExp("\\p{Script=Hebrew}","u"),h=new RegExp("\\p{Script=Hiragana}","u"),k=new RegExp("\\p{Script=Han}","u"),J=new RegExp("\\p{Script=Kannada}","u"),V=new RegExp("\\p{Script=Katakana}","u"),z=new RegExp("\\p{Script=Khmer}","u"),Z=new RegExp("\\p{Script=Lao}","u"),q=new RegExp("\\p{Script=Latin}","u"),Q=new RegExp("\\p{Script=Malayalam}","u"),X=new RegExp("\\p{Script=Myanmar}","u"),EE=new RegExp("\\p{Script=Oriya}","u"),aE=new RegExp("\\p{Script=Sinhala}","u"),RE=new RegExp("\\p{Script=Tamil}","u"),eE=new RegExp("\\p{Script=Telugu}","u"),pE=new RegExp("\\p{Script=Thai}","u"),uE=new RegExp("\\p{Script=Tibetan}","u"),_E=/[\u02BB\u02BC\u0027]/u,rE=S(E=>E.replace(I,""),"stripEmoji");export{J as A,RE as B,eE as C,Q as D,aE as E,pE as F,Z as G,uE as H,X as I,b as J,z as K,EE as L,_E as M,m as N,g as O,c as P,i as Q,K as R,s as S,t as T,w as U,x as V,T as W,L as X,l as a,d as b,M as c,C as d,H as e,B as f,O as g,G as h,o as i,I as j,D as k,$ as l,q as m,y as n,f as o,V as p,k as q,h as r,rE as s,U as t,Y as u,P as v,W as w,F as x,j as y,v as z};