ideaz-element
Version:
<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>
3 lines (2 loc) • 957 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(t="")=>t.split("").reduce((e,r)=>{const n=r.charCodeAt(0);return n>=0&&n<=128?e+1:e+2},0),c=(t="",e)=>{let r=0;return t.split("").reduce((n,o)=>{const s=o.charCodeAt(0);return s>=0&&s<=128?r+=1:r+=2,r<=e?n+o:n},"")},u=t=>t.replace(/-([a-z])/g,e=>e[1].toUpperCase()).replace(/^([a-z])/,e=>e[0].toUpperCase()),a=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),p=t=>typeof t=="string"?t.trim().endsWith("px")?t.trim():`${t.trim()}px`:typeof t=="number"?`${t.toString()}px`:"auto",g=t=>{if(t===void 0||typeof t=="number")return t;if(typeof t=="string"){const e=t.trim();if(e.endsWith("px"))return parseInt(e.slice(0,-2),10);{const r=parseInt(e,10);if(!isNaN(r))return r}}return NaN};exports.convertToPx=g;exports.cutStrByFullLength=c;exports.getPxValue=p;exports.getStrFullLength=i;exports.toCamelCase=u;exports.toKebabCase=a;
//# sourceMappingURL=string.cjs.map