tsu 2.10.0 → 2.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var x=Object.defineProperty;var
|
|
1
|
+
"use strict";var x=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var F=Object.prototype.hasOwnProperty;var S=(e,r)=>{for(var t in r)x(e,t,{get:r[t],enumerable:!0})},U=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of M(r))!F.call(e,o)&&o!==t&&x(e,o,{get:()=>r[o],enumerable:!(n=E(r,o))||n.enumerable});return e};var L=e=>U(x({},"__esModule",{value:!0}),e);var We={};S(We,{average:()=>W,capitalise:()=>N,capitalize:()=>Me,ceil:()=>X,chars:()=>Fe,clamp:()=>d,clone:()=>p,copyToClipboard:()=>ge,debounce:()=>ve,drop:()=>D,es:()=>me,floor:()=>z,groups:()=>R,head:()=>q,init:()=>B,isArray:()=>f,isBlank:()=>Se,isBoolean:()=>ee,isBrowser:()=>m,isDefined:()=>re,isEmpty:()=>Ue,isEmptyArray:()=>te,isEmptyObject:()=>ne,isEven:()=>H,isFunction:()=>oe,isNull:()=>s,isNumber:()=>g,isObject:()=>T,isObjectLike:()=>l,isOdd:()=>_,isString:()=>a,isTouchDevice:()=>ie,isUndefined:()=>ue,isWindow:()=>fe,ks:()=>se,last:()=>I,max:()=>V,memoise:()=>k,memoize:()=>ke,min:()=>J,noop:()=>Ae,once:()=>Oe,partition:()=>$,product:()=>K,randomChance:()=>Y,randomNumber:()=>u,range:()=>P,replaceChar:()=>Le,round:()=>Z,scroll:()=>je,shuffle:()=>pe,sleep:()=>Ce,splitArray:()=>ce,splitString:()=>De,sum:()=>b,tail:()=>ae,take:()=>xe,throttle:()=>Ne,toArray:()=>be,toCamel:()=>Re,toDp:()=>G,toKebab:()=>qe,toNumber:()=>Q,toOrdinal:()=>Be,toRomanNumerals:()=>Ie,truncate:()=>$e,unchars:()=>Pe,uniq:()=>de,uuid:()=>Ee,vs:()=>le});module.exports=L(We);function D(e,r){return e<=0?[...r]:r.slice(e)}function R(e,r){if(r<=0)throw new Error("[tsu] Invalid group size. Is it greater than 0?");if(r>=e.length)return[[...e]];let t=[];for(let n=0;n<e.length;n+=r)t.push(e.slice(n,n+r));return t}function q(e){return e[0]}function B(e){return e.slice(0,e.length-1)}function I(e){return e[e.length-1]}function $(e,r){let t=[],n=[];for(let o=0;o<e.length;o++){let i=e[o];r(i,o,e)?t.push(i):n.push(i)}return[t,n]}function P(...e){let r,t,n;e.length===1?(t=e[0],r=0,n=1):(r=e[0],t=e[1],n=e[2]||1),n<=0&&(console.warn("[tsu] warning: a step less than or equal to 0 will be set to 1."),n=1);let o=[],i=r;for(;i<t;)o.push(i),i+=n||1;return o}function W(e){return e.length<1?0:b(e)/e.length}function X(e,r=1){let t=e/r;return Math.ceil(t)*r}function d(e,r,t){return Math.min(t,Math.max(r,e))}function z(e,r=1){let t=e/r;return Math.floor(t)*r}function H(e){return e%2===0}function _(e){return e%2!==0}function V(...e){let r;return e.length===1&&Array.isArray(e[0])?r=e[0]:r=e,Math.max(...r)}function J(...e){let r;return e.length===1&&Array.isArray(e[0])?r=e[0]:r=e,Math.min(...r)}function K(e){if(e.length<1)return 0;let r=1;for(let t=0;t<e.length;t++)r*=e[t];return r}function u(...e){let r,t;return e.length===1?(r=0,t=e[0]):(r=e[0],t=e[1]),Math.floor(Math.random()*(t-r))+r}function Y(e){return u(e)===0}function Z(e,r=1){let t=e/r;return Math.round(t)*r}function b(e){let r=0;for(let t=0;t<e.length;t++)r+=e[t];return r}function G(e,r=0){r<0&&console.warn("[tsu] warning: decimalPlaces less than 0 are set to 0."),r>100&&console.warn("[tsu] warning: decimalPlaces greater than 100 are set to 100.");let t=d(r,0,100);return Number(e.toFixed(t))}function Q(e,r=[]){if(!e.length)return NaN;let t=["#","\xA3","\u20AC","$","%",",",...r],n=new RegExp(`[${t.join("")}]`,"g");return Number(e.replace(n,""))}function f(e){return Array.isArray(e)}function ee(e){return typeof e=="boolean"}function m(){return typeof window<"u"}function re(e){return typeof e<"u"}function te(e){return f(e)&&e.length===0}function ne(e){if(!T(e))return!1;for(let r in e)return!1;return!0}function oe(e){return typeof e=="function"}function s(e){return Object.prototype.toString.call(e)==="[object Null]"}function g(e){return typeof e=="number"}function T(e){return Object.prototype.toString.call(e)==="[object Object]"}function l(e){return typeof e=="object"}function a(e){return typeof e=="string"}function ie(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function ue(e){return typeof e>"u"}function fe(e){return m()&&Object.prototype.toString.call(e)==="[object Window]"}function p(e){if(f(e)){let r=[];for(let t=0;t<e.length;t++)l(e[t])&&!s(e[t])?r[t]=p(e[t]):r[t]=e[t];return r}if(l(e)&&!s(e)){let r={};for(let t in e)l(e[t])&&!s(e[t])?r[t]=p(e[t]):r[t]=e[t];return r}return e}function me(e){return Object.entries(e)}function se(e){return Object.keys(e)}function le(e){return Object.values(e)}function pe(e){let r=p(e),t,n,o;for(t=r.length;t;t-=1)n=u(t),o=r[t-1],r[t-1]=r[n],r[n]=o;return r}function ce(e,r){return r<=0?[[],[...e]]:r>e.length?[[...e],[]]:[e.slice(0,r),e.slice(r)]}function ae(e){return e.slice(1)}function xe(e,r){return e<=0?[]:r.slice(0,e)}function be(e){return e?Array.isArray(e)?e:[e]:[]}function de(e){return Array.from(new Set(e))}function Te(e){let r=document.createElement("textarea");r.value=e??"",r.style.position="absolute",r.style.opacity="0",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function ge(e){m()&&(window.navigator&&"clipboard"in window.navigator?navigator.clipboard.writeText(e):Te(e))}function ye(e){return e<.5?4*Math.pow(e,3):(e-1)*(2*e-2)*(2*e-2)+1}function he(e,r,t,n){return e+(r-e)*ye(t/n)}function we(e,r){return e.nodeName==="HTML"?-r:e.getBoundingClientRect().top+r}function je({to:e,offset:r=0,duration:t=1e3,container:n=null}){let o=a(e)?document.querySelector(e):e,i=a(n)?document.querySelector(n):n,c=i?.scrollTop||window?.pageYOffset||0,y=(g(o)?o:we(o,c))+r,C=Date.now();function h(){let w=Date.now()-C,j=w<t,v=j?he(c,y,w,t):y;j&&requestAnimationFrame(h),i?i.scrollTop=v:window.scrollTo(0,v)}h()}function ve(e,r){r<0&&console.warn("[tsu] warning: debounce delays less than 0 will be set to 0.");let t;return function(...n){clearTimeout(t),t=setTimeout(()=>{clearTimeout(t),e(...n)},r)}}function k(e){let r={};return function(...t){let n=JSON.stringify(t);if(n in r)return r[n];let o=e(...t);return r[n]=o,o}}var ke=k;function Oe(e){let r=!1;return(...t)=>{r||(e(...t),r=!0)}}function Ne(e,r){r<0&&console.warn("[tsu] warning: throttle limits less than 0 will be set to 0.");let t=!1;return function(...n){t||(e(...n),t=!0,setTimeout(()=>{t=!1},r))}}function Ae(){}async function Ce(e){return e<0&&console.warn("[tsu] warning: sleep durations less than 0 are set to 0."),new Promise(r=>{setTimeout(r,e)})}var O="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";function Ee(e=16){let r=O.length,t=e,n="";for(;t--;)n+=O[u(r)];return n}function N(e,r=!1,t=" "){return r?e.split(t).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(t):e.charAt(0).toUpperCase()+e.slice(1)}var Me=N;function Fe(e){return e.split("")}function Se(e){return e.trim().length===0}function Ue(e){return e.length===0}function Le(e,r,t){return r<0||r>e.length-1?e:e.slice(0,r)+t+e.slice(r+1)}function De(e,r){return r<=0?["",e]:r>e.length?[e,""]:[e.slice(0,r),e.slice(r)]}function Re(e){let r=/-(\w)/g;return e.replace(r,(t,n)=>n?n.toUpperCase():"")}function qe(e){let r=/\B([A-Z])/g;return e.replace(r,"-$1").toLowerCase()}function Be(e){let t=["st","nd","rd"][(Math.abs(e)/10%10^1&&Math.abs(e)%10)-1]||"th";return`${e}${t}`}var A={1:"I",4:"IV",5:"V",9:"IX",10:"X",40:"XL",50:"L",90:"XC",100:"C",400:"CD",500:"D",900:"CM",1e3:"M"};function Ie(e,r=!1){let t=e,n="",o=Object.keys(A).map(Number).sort((i,c)=>c-i);for(let i of o)for(;t>=i;)n+=A[i],t-=i;return r?n.toLowerCase():n}function $e(e,r,t="..."){return r<=0?t:e.slice(0,r)+t}function Pe(e){return e.join("")}0&&(module.exports={average,capitalise,capitalize,ceil,chars,clamp,clone,copyToClipboard,debounce,drop,es,floor,groups,head,init,isArray,isBlank,isBoolean,isBrowser,isDefined,isEmpty,isEmptyArray,isEmptyObject,isEven,isFunction,isNull,isNumber,isObject,isObjectLike,isOdd,isString,isTouchDevice,isUndefined,isWindow,ks,last,max,memoise,memoize,min,noop,once,partition,product,randomChance,randomNumber,range,replaceChar,round,scroll,shuffle,sleep,splitArray,splitString,sum,tail,take,throttle,toArray,toCamel,toDp,toKebab,toNumber,toOrdinal,toRomanNumerals,truncate,unchars,uniq,uuid,vs});
|
package/dist/index.d.cts
CHANGED
|
@@ -318,6 +318,14 @@ declare function sleep(duration: number): Promise<void>;
|
|
|
318
318
|
*/
|
|
319
319
|
declare function uuid(length?: number): string;
|
|
320
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Returns the average of a number array.
|
|
323
|
+
*
|
|
324
|
+
* @param ns - The number array.
|
|
325
|
+
* @returns The average.
|
|
326
|
+
*/
|
|
327
|
+
declare function average(ns: readonly number[]): number;
|
|
328
|
+
|
|
321
329
|
/**
|
|
322
330
|
* Rounds a number up to the nearest multiple of the specified factor.
|
|
323
331
|
*
|
|
@@ -421,6 +429,15 @@ declare function round(n: number, factor?: number): number;
|
|
|
421
429
|
*/
|
|
422
430
|
declare function sum(ns: readonly number[]): number;
|
|
423
431
|
|
|
432
|
+
/**
|
|
433
|
+
* Rounds a number to a specified number of decimal places.
|
|
434
|
+
*
|
|
435
|
+
* @param n - The number to round.
|
|
436
|
+
* @param decimalPlaces - The number of decimal places to round to.
|
|
437
|
+
* @returns The rounded number.
|
|
438
|
+
*/
|
|
439
|
+
declare function toDp(n: number, decimalPlaces?: number): number;
|
|
440
|
+
|
|
424
441
|
/**
|
|
425
442
|
* Converts a string which contains a number into the number itself.
|
|
426
443
|
*
|
|
@@ -567,4 +584,4 @@ declare function truncate(str: string, length: number, suffix?: string): string;
|
|
|
567
584
|
*/
|
|
568
585
|
declare function unchars(chars: string[]): string;
|
|
569
586
|
|
|
570
|
-
export { type Arrayable, type Fn, type Nullable, type Obj, type VoidFn, capitalise, capitalize, ceil, chars, clamp, clone, copyToClipboard, debounce, drop, es, floor, groups, head, init, isArray, isBlank, isBoolean, isBrowser, isDefined, isEmpty, isEmptyArray, isEmptyObject, isEven, isFunction, isNull, isNumber, isObject, isObjectLike, isOdd, isString, isTouchDevice, isUndefined, isWindow, ks, last, max, memoise, memoize, min, noop, once, partition, product, randomChance, randomNumber, range, replaceChar, round, scroll, shuffle, sleep, splitArray, splitString, sum, tail, take, throttle, toArray, toCamel, toKebab, toNumber, toOrdinal, toRomanNumerals, truncate, unchars, uniq, uuid, vs };
|
|
587
|
+
export { type Arrayable, type Fn, type Nullable, type Obj, type VoidFn, average, capitalise, capitalize, ceil, chars, clamp, clone, copyToClipboard, debounce, drop, es, floor, groups, head, init, isArray, isBlank, isBoolean, isBrowser, isDefined, isEmpty, isEmptyArray, isEmptyObject, isEven, isFunction, isNull, isNumber, isObject, isObjectLike, isOdd, isString, isTouchDevice, isUndefined, isWindow, ks, last, max, memoise, memoize, min, noop, once, partition, product, randomChance, randomNumber, range, replaceChar, round, scroll, shuffle, sleep, splitArray, splitString, sum, tail, take, throttle, toArray, toCamel, toDp, toKebab, toNumber, toOrdinal, toRomanNumerals, truncate, unchars, uniq, uuid, vs };
|
package/dist/index.d.ts
CHANGED
|
@@ -318,6 +318,14 @@ declare function sleep(duration: number): Promise<void>;
|
|
|
318
318
|
*/
|
|
319
319
|
declare function uuid(length?: number): string;
|
|
320
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Returns the average of a number array.
|
|
323
|
+
*
|
|
324
|
+
* @param ns - The number array.
|
|
325
|
+
* @returns The average.
|
|
326
|
+
*/
|
|
327
|
+
declare function average(ns: readonly number[]): number;
|
|
328
|
+
|
|
321
329
|
/**
|
|
322
330
|
* Rounds a number up to the nearest multiple of the specified factor.
|
|
323
331
|
*
|
|
@@ -421,6 +429,15 @@ declare function round(n: number, factor?: number): number;
|
|
|
421
429
|
*/
|
|
422
430
|
declare function sum(ns: readonly number[]): number;
|
|
423
431
|
|
|
432
|
+
/**
|
|
433
|
+
* Rounds a number to a specified number of decimal places.
|
|
434
|
+
*
|
|
435
|
+
* @param n - The number to round.
|
|
436
|
+
* @param decimalPlaces - The number of decimal places to round to.
|
|
437
|
+
* @returns The rounded number.
|
|
438
|
+
*/
|
|
439
|
+
declare function toDp(n: number, decimalPlaces?: number): number;
|
|
440
|
+
|
|
424
441
|
/**
|
|
425
442
|
* Converts a string which contains a number into the number itself.
|
|
426
443
|
*
|
|
@@ -567,4 +584,4 @@ declare function truncate(str: string, length: number, suffix?: string): string;
|
|
|
567
584
|
*/
|
|
568
585
|
declare function unchars(chars: string[]): string;
|
|
569
586
|
|
|
570
|
-
export { type Arrayable, type Fn, type Nullable, type Obj, type VoidFn, capitalise, capitalize, ceil, chars, clamp, clone, copyToClipboard, debounce, drop, es, floor, groups, head, init, isArray, isBlank, isBoolean, isBrowser, isDefined, isEmpty, isEmptyArray, isEmptyObject, isEven, isFunction, isNull, isNumber, isObject, isObjectLike, isOdd, isString, isTouchDevice, isUndefined, isWindow, ks, last, max, memoise, memoize, min, noop, once, partition, product, randomChance, randomNumber, range, replaceChar, round, scroll, shuffle, sleep, splitArray, splitString, sum, tail, take, throttle, toArray, toCamel, toKebab, toNumber, toOrdinal, toRomanNumerals, truncate, unchars, uniq, uuid, vs };
|
|
587
|
+
export { type Arrayable, type Fn, type Nullable, type Obj, type VoidFn, average, capitalise, capitalize, ceil, chars, clamp, clone, copyToClipboard, debounce, drop, es, floor, groups, head, init, isArray, isBlank, isBoolean, isBrowser, isDefined, isEmpty, isEmptyArray, isEmptyObject, isEven, isFunction, isNull, isNumber, isObject, isObjectLike, isOdd, isString, isTouchDevice, isUndefined, isWindow, ks, last, max, memoise, memoize, min, noop, once, partition, product, randomChance, randomNumber, range, replaceChar, round, scroll, shuffle, sleep, splitArray, splitString, sum, tail, take, throttle, toArray, toCamel, toDp, toKebab, toNumber, toOrdinal, toRomanNumerals, truncate, unchars, uniq, uuid, vs };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function S(e,r){return e<=0?[...r]:r.slice(e)}function L(e,r){if(r<=0)throw new Error("[tsu] Invalid group size. Is it greater than 0?");if(r>=e.length)return[[...e]];let t=[];for(let n=0;n<e.length;n+=r)t.push(e.slice(n,n+r));return t}function R(e){return e[0]}function B(e){return e.slice(0,e.length-1)}function $(e){return e[e.length-1]}function W(e,r){let t=[],n=[];for(let o=0;o<e.length;o++){let i=e[o];r(i,o,e)?t.push(i):n.push(i)}return[t,n]}function z(...e){let r,t,n;e.length===1?(t=e[0],r=0,n=1):(r=e[0],t=e[1],n=e[2]||1),n<=0&&(console.warn("[tsu] warning: a step less than or equal to 0 will be set to 1."),n=1);let o=[],i=r;for(;i<t;)o.push(i),i+=n||1;return o}function V(e){return e.length<1?0:y(e)/e.length}function K(e,r=1){let t=e/r;return Math.ceil(t)*r}function h(e,r,t){return Math.min(t,Math.max(r,e))}function G(e,r=1){let t=e/r;return Math.floor(t)*r}function ee(e){return e%2===0}function te(e){return e%2!==0}function oe(...e){let r;return e.length===1&&Array.isArray(e[0])?r=e[0]:r=e,Math.max(...r)}function ue(...e){let r;return e.length===1&&Array.isArray(e[0])?r=e[0]:r=e,Math.min(...r)}function me(e){if(e.length<1)return 0;let r=1;for(let t=0;t<e.length;t++)r*=e[t];return r}function u(...e){let r,t;return e.length===1?(r=0,t=e[0]):(r=e[0],t=e[1]),Math.floor(Math.random()*(t-r))+r}function ce(e){return u(e)===0}function xe(e,r=1){let t=e/r;return Math.round(t)*r}function y(e){let r=0;for(let t=0;t<e.length;t++)r+=e[t];return r}function ge(e,r=0){r<0&&console.warn("[tsu] warning: decimalPlaces less than 0 are set to 0."),r>100&&console.warn("[tsu] warning: decimalPlaces greater than 100 are set to 100.");let t=h(r,0,100);return Number(e.toFixed(t))}function he(e,r=[]){if(!e.length)return NaN;let t=["#","\xA3","\u20AC","$","%",",",...r],n=new RegExp(`[${t.join("")}]`,"g");return Number(e.replace(n,""))}function m(e){return Array.isArray(e)}function Ie(e){return typeof e=="boolean"}function s(){return typeof window<"u"}function We(e){return typeof e<"u"}function He(e){return m(e)&&e.length===0}function Je(e){if(!w(e))return!1;for(let r in e)return!1;return!0}function Ye(e){return typeof e=="function"}function l(e){return Object.prototype.toString.call(e)==="[object Null]"}function j(e){return typeof e=="number"}function w(e){return Object.prototype.toString.call(e)==="[object Object]"}function p(e){return typeof e=="object"}function a(e){return typeof e=="string"}function nr(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function ir(e){return typeof e>"u"}function mr(e){return s()&&Object.prototype.toString.call(e)==="[object Window]"}function c(e){if(m(e)){let r=[];for(let t=0;t<e.length;t++)p(e[t])&&!l(e[t])?r[t]=c(e[t]):r[t]=e[t];return r}if(p(e)&&!l(e)){let r={};for(let t in e)p(e[t])&&!l(e[t])?r[t]=c(e[t]):r[t]=e[t];return r}return e}function Cr(e){return Object.entries(e)}function Mr(e){return Object.keys(e)}function Sr(e){return Object.values(e)}function Pr(e){let r=c(e),t,n,o;for(t=r.length;t;t-=1)n=u(t),o=r[t-1],r[t-1]=r[n],r[n]=o;return r}function Xr(e,r){return r<=0?[[],[...e]]:r>e.length?[[...e],[]]:[e.slice(0,r),e.slice(r)]}function Hr(e){return e.slice(1)}function Vr(e,r){return e<=0?[]:r.slice(0,e)}function Kr(e){return e?Array.isArray(e)?e:[e]:[]}function Zr(e){return Array.from(new Set(e))}function N(e){let r=document.createElement("textarea");r.value=e??"",r.style.position="absolute",r.style.opacity="0",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function xt(e){s()&&(window.navigator&&"clipboard"in window.navigator?navigator.clipboard.writeText(e):N(e))}function A(e){return e<.5?4*Math.pow(e,3):(e-1)*(2*e-2)*(2*e-2)+1}function C(e,r,t,n){return e+(r-e)*A(t/n)}function E(e,r){return e.nodeName==="HTML"?-r:e.getBoundingClientRect().top+r}function Tt({to:e,offset:r=0,duration:t=1e3,container:n=null}){let o=a(e)?document.querySelector(e):e,i=a(n)?document.querySelector(n):n,f=i?.scrollTop||window?.pageYOffset||0,x=(j(o)?o:E(o,f))+r,O=Date.now();function b(){let d=Date.now()-O,T=d<t,g=T?C(f,x,d,t):x;T&&requestAnimationFrame(b),i?i.scrollTop=g:window.scrollTo(0,g)}b()}function jt(e,r){r<0&&console.warn("[tsu] warning: debounce delays less than 0 will be set to 0.");let t;return function(...n){clearTimeout(t),t=setTimeout(()=>{clearTimeout(t),e(...n)},r)}}function M(e){let r={};return function(...t){let n=JSON.stringify(t);if(n in r)return r[n];let o=e(...t);return r[n]=o,o}}var kt=M;function Nt(e){let r=!1;return(...t)=>{r||(e(...t),r=!0)}}function Ct(e,r){r<0&&console.warn("[tsu] warning: throttle limits less than 0 will be set to 0.");let t=!1;return function(...n){t||(e(...n),t=!0,setTimeout(()=>{t=!1},r))}}function Dt(){}async function qt(e){return e<0&&console.warn("[tsu] warning: sleep durations less than 0 are set to 0."),new Promise(r=>{setTimeout(r,e)})}var v="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";function $t(e=16){let r=v.length,t=e,n="";for(;t--;)n+=v[u(r)];return n}function F(e,r=!1,t=" "){return r?e.split(t).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(t):e.charAt(0).toUpperCase()+e.slice(1)}var _t=F;function Jt(e){return e.split("")}function Yt(e){return e.trim().length===0}function Gt(e){return e.length===0}function en(e,r,t){return r<0||r>e.length-1?e:e.slice(0,r)+t+e.slice(r+1)}function tn(e,r){return r<=0?["",e]:r>e.length?[e,""]:[e.slice(0,r),e.slice(r)]}function on(e){let r=/-(\w)/g;return e.replace(r,(t,n)=>n?n.toUpperCase():"")}function fn(e){let r=/\B([A-Z])/g;return e.replace(r,"-$1").toLowerCase()}function sn(e){let t=["st","nd","rd"][(Math.abs(e)/10%10^1&&Math.abs(e)%10)-1]||"th";return`${e}${t}`}var k={1:"I",4:"IV",5:"V",9:"IX",10:"X",40:"XL",50:"L",90:"XC",100:"C",400:"CD",500:"D",900:"CM",1e3:"M"};function pn(e,r=!1){let t=e,n="",o=Object.keys(k).map(Number).sort((i,f)=>f-i);for(let i of o)for(;t>=i;)n+=k[i],t-=i;return r?n.toLowerCase():n}function an(e,r,t="..."){return r<=0?t:e.slice(0,r)+t}function bn(e){return e.join("")}export{V as average,F as capitalise,_t as capitalize,K as ceil,Jt as chars,h as clamp,c as clone,xt as copyToClipboard,jt as debounce,S as drop,Cr as es,G as floor,L as groups,R as head,B as init,m as isArray,Yt as isBlank,Ie as isBoolean,s as isBrowser,We as isDefined,Gt as isEmpty,He as isEmptyArray,Je as isEmptyObject,ee as isEven,Ye as isFunction,l as isNull,j as isNumber,w as isObject,p as isObjectLike,te as isOdd,a as isString,nr as isTouchDevice,ir as isUndefined,mr as isWindow,Mr as ks,$ as last,oe as max,M as memoise,kt as memoize,ue as min,Dt as noop,Nt as once,W as partition,me as product,ce as randomChance,u as randomNumber,z as range,en as replaceChar,xe as round,Tt as scroll,Pr as shuffle,qt as sleep,Xr as splitArray,tn as splitString,y as sum,Hr as tail,Vr as take,Ct as throttle,Kr as toArray,on as toCamel,ge as toDp,fn as toKebab,he as toNumber,sn as toOrdinal,pn as toRomanNumerals,an as truncate,bn as unchars,Zr as uniq,$t as uuid,Sr as vs};
|