@react-hive/honey-utils 1.2.0 → 1.4.0
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/README.md +313 -0
- package/dist/README.md +313 -0
- package/dist/array.d.ts +71 -0
- package/dist/guards.d.ts +149 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.dev.cjs +324 -10
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/string.d.ts +36 -0
- package/package.json +11 -3
package/dist/guards.d.ts
CHANGED
|
@@ -1,8 +1,85 @@
|
|
|
1
|
+
export declare function assert(condition: any, message: string): asserts condition;
|
|
2
|
+
/**
|
|
3
|
+
* Checks if a value is null.
|
|
4
|
+
*
|
|
5
|
+
* @param value - The value to check.
|
|
6
|
+
*
|
|
7
|
+
* @returns `true` if the value is null; otherwise, `false`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const isNull: (value: unknown) => value is null;
|
|
10
|
+
/**
|
|
11
|
+
* Checks if a value is a string.
|
|
12
|
+
*
|
|
13
|
+
* @param value - The value to check.
|
|
14
|
+
*
|
|
15
|
+
* @returns `true` if the value is a string; otherwise, `false`.
|
|
16
|
+
*/
|
|
1
17
|
export declare const isString: (value: unknown) => value is string;
|
|
18
|
+
/**
|
|
19
|
+
* Checks if a value is a number.
|
|
20
|
+
*
|
|
21
|
+
* @param value - The value to check.
|
|
22
|
+
*
|
|
23
|
+
* @returns `true` if the value is a number; otherwise, `false`.
|
|
24
|
+
*/
|
|
2
25
|
export declare const isNumber: (value: unknown) => value is number;
|
|
26
|
+
/**
|
|
27
|
+
* Checks if a value is a boolean.
|
|
28
|
+
*
|
|
29
|
+
* @param value - The value to check.
|
|
30
|
+
*
|
|
31
|
+
* @returns `true` if the value is a boolean; otherwise, `false`.
|
|
32
|
+
*/
|
|
3
33
|
export declare const isBool: (value: unknown) => value is boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Checks if a value is an object.
|
|
36
|
+
*
|
|
37
|
+
* @param value - The value to check.
|
|
38
|
+
*
|
|
39
|
+
* @returns `true` if the value is an object; otherwise, `false`.
|
|
40
|
+
*/
|
|
4
41
|
export declare const isObject: (value: unknown) => value is object;
|
|
42
|
+
/**
|
|
43
|
+
* Checks if a value is an empty object (no own enumerable properties).
|
|
44
|
+
*
|
|
45
|
+
* @param value - The value to check.
|
|
46
|
+
*
|
|
47
|
+
* @returns `true` if the value is an empty object; otherwise, `false`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const isEmptyObject: (value: unknown) => value is Record<string, never>;
|
|
50
|
+
/**
|
|
51
|
+
* Checks if a value is an array.
|
|
52
|
+
*
|
|
53
|
+
* @param value - The value to check.
|
|
54
|
+
*
|
|
55
|
+
* @returns `true` if the value is an array; otherwise, `false`.
|
|
56
|
+
*/
|
|
57
|
+
export declare const isArray: (value: unknown) => value is unknown[];
|
|
58
|
+
/**
|
|
59
|
+
* Checks if a value is an empty array.
|
|
60
|
+
*
|
|
61
|
+
* @param value - The value to check.
|
|
62
|
+
*
|
|
63
|
+
* @returns `true` if the value is an empty array; otherwise, `false`.
|
|
64
|
+
*/
|
|
65
|
+
export declare const isEmptyArray: (value: unknown) => value is [];
|
|
66
|
+
/**
|
|
67
|
+
* Checks if a value is a function.
|
|
68
|
+
*
|
|
69
|
+
* @param value - The value to check.
|
|
70
|
+
*
|
|
71
|
+
* @returns `true` if the value is a function; otherwise, `false`.
|
|
72
|
+
*/
|
|
5
73
|
export declare const isFunction: (value: unknown) => value is Function;
|
|
74
|
+
/**
|
|
75
|
+
* Checks if a value is a Promise.
|
|
76
|
+
*
|
|
77
|
+
* @template T - The type of the value that the Promise resolves to.
|
|
78
|
+
*
|
|
79
|
+
* @param value - The value to check.
|
|
80
|
+
*
|
|
81
|
+
* @returns `true` if the value is a Promise; otherwise, `false`.
|
|
82
|
+
*/
|
|
6
83
|
export declare const isPromise: <T = unknown>(value: unknown) => value is Promise<T>;
|
|
7
84
|
/**
|
|
8
85
|
* Checks if a value is null or undefined.
|
|
@@ -25,3 +102,75 @@ export declare const isNil: (value: unknown) => value is null | undefined;
|
|
|
25
102
|
* @returns `true` if the value is empty; otherwise, `false`.
|
|
26
103
|
*/
|
|
27
104
|
export declare const isNilOrEmptyString: (value: unknown) => value is null | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Checks if a value is a Date object.
|
|
107
|
+
*
|
|
108
|
+
* @param value - The value to check.
|
|
109
|
+
*
|
|
110
|
+
* @returns `true` if the value is a Date object; otherwise, `false`.
|
|
111
|
+
*/
|
|
112
|
+
export declare const isDate: (value: unknown) => value is Date;
|
|
113
|
+
/**
|
|
114
|
+
* Checks if a value is a valid Date object (not Invalid Date).
|
|
115
|
+
*
|
|
116
|
+
* @param value - The value to check.
|
|
117
|
+
*
|
|
118
|
+
* @returns `true` if the value is a valid Date object; otherwise, `false`.
|
|
119
|
+
*/
|
|
120
|
+
export declare const isValidDate: (value: unknown) => value is Date;
|
|
121
|
+
/**
|
|
122
|
+
* Checks if a value is a RegExp object.
|
|
123
|
+
*
|
|
124
|
+
* @param value - The value to check.
|
|
125
|
+
*
|
|
126
|
+
* @returns `true` if the value is a RegExp object; otherwise, `false`.
|
|
127
|
+
*/
|
|
128
|
+
export declare const isRegExp: (value: unknown) => value is RegExp;
|
|
129
|
+
/**
|
|
130
|
+
* Checks if a value is a Map.
|
|
131
|
+
*
|
|
132
|
+
* @param value - The value to check.
|
|
133
|
+
*
|
|
134
|
+
* @returns `true` if the value is a Map; otherwise, `false`.
|
|
135
|
+
*/
|
|
136
|
+
export declare const isMap: (value: unknown) => value is Map<unknown, unknown>;
|
|
137
|
+
/**
|
|
138
|
+
* Checks if a value is a Set.
|
|
139
|
+
*
|
|
140
|
+
* @param value - The value to check.
|
|
141
|
+
*
|
|
142
|
+
* @returns `true` if the value is a Set; otherwise, `false`.
|
|
143
|
+
*/
|
|
144
|
+
export declare const isSet: (value: unknown) => value is Set<unknown>;
|
|
145
|
+
/**
|
|
146
|
+
* Checks if a value is a Symbol.
|
|
147
|
+
*
|
|
148
|
+
* @param value - The value to check.
|
|
149
|
+
*
|
|
150
|
+
* @returns `true` if the value is a Symbol; otherwise, `false`.
|
|
151
|
+
*/
|
|
152
|
+
export declare const isSymbol: (value: unknown) => value is symbol;
|
|
153
|
+
/**
|
|
154
|
+
* Checks if a value is undefined.
|
|
155
|
+
*
|
|
156
|
+
* @param value - The value to check.
|
|
157
|
+
*
|
|
158
|
+
* @returns `true` if the value is undefined; otherwise, `false`.
|
|
159
|
+
*/
|
|
160
|
+
export declare const isUndefined: (value: unknown) => value is undefined;
|
|
161
|
+
/**
|
|
162
|
+
* Checks if a value is a finite number.
|
|
163
|
+
*
|
|
164
|
+
* @param value - The value to check.
|
|
165
|
+
*
|
|
166
|
+
* @returns `true` if the value is a finite number; otherwise, `false`.
|
|
167
|
+
*/
|
|
168
|
+
export declare const isFiniteNumber: (value: unknown) => value is number;
|
|
169
|
+
/**
|
|
170
|
+
* Checks if a value is an integer.
|
|
171
|
+
*
|
|
172
|
+
* @param value - The value to check.
|
|
173
|
+
*
|
|
174
|
+
* @returns `true` if the value is an integer; otherwise, `false`.
|
|
175
|
+
*/
|
|
176
|
+
export declare const isInteger: (value: unknown) => value is number;
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e={d:(t,
|
|
1
|
+
(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{assert:()=>a,boolFilter:()=>E,calculateEuclideanDistance:()=>I,calculateMovingSpeed:()=>$,calculatePercentage:()=>B,camelToDashCase:()=>n,chunk:()=>P,difference:()=>T,getTransformationValues:()=>L,hashString:()=>o,intersection:()=>D,invokeIfFunction:()=>x,isArray:()=>g,isBool:()=>u,isDate:()=>S,isEmptyArray:()=>y,isEmptyObject:()=>p,isFiniteNumber:()=>M,isFunction:()=>b,isInteger:()=>N,isMap:()=>O,isNil:()=>d,isNilOrEmptyString:()=>h,isNull:()=>s,isNumber:()=>c,isObject:()=>f,isPromise:()=>m,isRegExp:()=>A,isSet:()=>j,isString:()=>l,isSymbol:()=>v,isUndefined:()=>C,isValidDate:()=>w,noop:()=>k,splitStringIntoWords:()=>i,toKebabCase:()=>r,unique:()=>F});const r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=e=>{const t=e.charAt(0),r=e.slice(1);return t.toLowerCase()+r.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)},i=e=>e.split(" ").filter(Boolean),o=e=>{let t=5381;for(let r=0;r<e.length;r++)t=33*t^e.charCodeAt(r);return(t>>>0).toString(36)};function a(e,t){if(!e)throw new Error(t)}const s=e=>null===e,l=e=>"string"==typeof e,c=e=>"number"==typeof e,u=e=>"boolean"==typeof e,f=e=>"object"==typeof e,p=e=>f(e)&&!s(e)&&0===Object.keys(e).length,g=e=>Array.isArray(e),y=e=>g(e)&&0===e.length,b=e=>"function"==typeof e,m=e=>b(e?.then),d=e=>null==e,h=e=>""===e||d(e),S=e=>e instanceof Date,w=e=>S(e)&&!isNaN(e.getTime()),A=e=>e instanceof RegExp,O=e=>e instanceof Map,j=e=>e instanceof Set,v=e=>"symbol"==typeof e,C=e=>void 0===e,M=e=>c(e)&&isFinite(e),N=e=>c(e)&&Number.isInteger(e),E=e=>e.filter(Boolean),F=e=>[...new Set(e)],P=(e,t)=>(a(t>0,"Chunk size must be greater than 0"),Array.from({length:Math.ceil(e.length/t)},(r,n)=>e.slice(n*t,(n+1)*t))),D=(...e)=>{if(0===e.length)return[];if(1===e.length)return[...e[0]];const[t,...r]=e;return F(t).filter(e=>r.every(t=>t.includes(e)))},T=(e,t)=>e.filter(e=>!t.includes(e)),k=()=>{},x=(e,...t)=>"function"==typeof e?e(...t):e,I=(e,t,r,n)=>{const i=r-e,o=n-t;return Math.sqrt(i**2+o**2)},$=(e,t)=>Math.abs(e/t),B=(e,t)=>e*t/100,L=e=>{const t=window.getComputedStyle(e).getPropertyValue("transform").match(/^matrix\((.+)\)$/);if(!t)return{translateX:0,translateY:0};const r=t[1].split(", ");return{translateX:parseFloat(r[4]),translateY:parseFloat(r[5])}};module.exports=t})();
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,6ZCLhD,MAAMC,EAAeC,GAC1BA,EAAMC,QAAQ,qBAAsB,SAASC,cAElCC,EAAmBH,GAC9BA,EAAMC,QAAQ,SAAUG,GAAU,IAAIA,EAAOF,iBASlCG,EAAwBL,GAA4BA,EAAMM,MAAM,KAAKC,OAAOC,SA0B5EC,EAAcT,IACzB,IAAIU,EAAO,KAEX,IAAK,IAAIC,EAAI,EAAGA,EAAIX,EAAMY,OAAQD,IAChCD,EAAe,GAAPA,EAAaV,EAAMa,WAAWF,GAGxC,OAAQD,IAAS,GAAGI,SAAS,KClClBC,EAAiBC,GAC5BA,EAAMT,OAAOC,SCbFS,EAAO,OAcPC,EAAmB,CAC9BlB,KACGmB,IAC0B,mBAAVnB,EAAwBA,KAAuCmB,GAAQnB,ECjB/EoB,EAAYtB,GAAqD,iBAAVA,EAEvDuB,EAAYvB,GAAqD,iBAAVA,EAEvDwB,EAAUxB,GAAsD,kBAAVA,EAEtDyB,EAAYzB,GAAqD,iBAAVA,EAEvD0B,EAAc1B,GAAoC,mBAAVA,EAExC2B,EAA0B3B,GACrC0B,EAAY1B,GAAsB4B,MASvBC,EAAS7B,GACpBA,QAcW8B,EAAsB9B,GACvB,KAAVA,GAAgB6B,EAAM7B,GC1BX+B,EAA6B,CACxCC,EACAC,EACAC,EACAC,KAEA,MAAMC,EAASF,EAAOF,EAChBK,EAASF,EAAOF,EAEtB,OAAOK,KAAKC,KAAKH,GAAU,EAAIC,GAAU,IAW9BG,EAAuB,CAACC,EAAeC,IAClDJ,KAAKK,IAAIF,EAAQC,GAUNE,EAAsB,CAAC5C,EAAe6C,IACzC7C,EAAQ6C,EAAc,IC9BnBC,EAA2BC,IACtC,MAGMC,EAHiBC,OAAOC,iBAAiBH,GACTI,iBAAiB,aAEzBC,MAAM,oBACpC,IAAKJ,EACH,MAAO,CACLK,WAAY,EACZC,WAAY,GAIhB,MAAMC,EAAkBP,EAAO,GAAGxC,MAAM,MAKxC,MAAO,CACL6C,WAJiBG,WAAWD,EAAgB,IAK5CD,WAJiBE,WAAWD,EAAgB,MCpBzC,SAASE,EAAOC,EAAgBC,GACrC,IAAKD,EACH,MAAM,IAAIE,MAAMD,EAEpB,C","sources":["webpack://@react-hive/honey-utils/webpack/bootstrap","webpack://@react-hive/honey-utils/webpack/runtime/define property getters","webpack://@react-hive/honey-utils/webpack/runtime/hasOwnProperty shorthand","webpack://@react-hive/honey-utils/webpack/runtime/make namespace object","webpack://@react-hive/honey-utils/./src/string.ts","webpack://@react-hive/honey-utils/./src/array.ts","webpack://@react-hive/honey-utils/./src/function.ts","webpack://@react-hive/honey-utils/./src/guards.ts","webpack://@react-hive/honey-utils/./src/math.ts","webpack://@react-hive/honey-utils/./src/dom.ts","webpack://@react-hive/honey-utils/./src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export const toKebabCase = (input: string): string =>\n input.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\nexport const camelToDashCase = (input: string): string =>\n input.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);\n\n/**\n * Splits a string into an array of filtered from redundant spaces words.\n *\n * @param input - The input string to be split.\n *\n * @returns An array of words from the input string.\n */\nexport const splitStringIntoWords = (input: string): string[] => input.split(' ').filter(Boolean);\n\n/**\n * Generates a short, consistent hash string from an input string using a DJB2-inspired algorithm.\n *\n * This function uses a variation of the DJB2 algorithm, which is a simple yet effective hashing algorithm\n * based on bitwise XOR (`^`) and multiplication by 33. It produces a non-negative 32-bit integer,\n * which is then converted to a base-36 string (digits + lowercase letters) to produce a compact output.\n *\n * Useful for:\n * - Generating stable class names in CSS-in-JS libraries.\n * - Producing consistent cache keys.\n * - Quick and lightweight hashing needs where cryptographic security is not required.\n *\n * ⚠️ This is not cryptographically secure and should not be used for hashing passwords or sensitive data.\n *\n * @param input - The input string to hash.\n *\n * @returns A short, base-36 encoded hash string.\n *\n * @example\n * ```ts\n * const className = hashString('background-color: red;');\n * // → 'e4k1z0x'\n * ```\n */\nexport const hashString = (input: string): string => {\n let hash = 5381;\n\n for (let i = 0; i < input.length; i++) {\n hash = (hash * 33) ^ input.charCodeAt(i);\n }\n\n return (hash >>> 0).toString(36);\n};\n","/**\n * Filters out `null`, `undefined`, and other falsy values from an array,\n * returning a typed array of only truthy `Item` values.\n *\n * Useful when working with optional or nullable items that need to be sanitized.\n *\n * @template T - The type of the items in the array.\n *\n * @param array - An array of items that may include `null`, `undefined`, or falsy values.\n *\n * @returns A new array containing only truthy `Item` values.\n */\nexport const boolFilter = <T>(array: (T | false | null | undefined)[]): T[] =>\n array.filter(Boolean) as T[];\n","export const noop = () => {};\n\n/**\n * Invokes the given input if it is a function, passing the provided arguments.\n * Otherwise, returns the input as-is.\n *\n * @template Args - Tuple of argument types to pass to the function.\n * @template Result - Return type of the function or the value.\n *\n * @param input - A function to invoke with `args`, or a direct value of type `Result`.\n * @param args - Arguments to pass if `input` is a function.\n *\n * @returns The result of invoking the function, or the original value if it's not a function.\n */\nexport const invokeIfFunction = <Args extends any[], Result>(\n input: ((...args: Args) => Result) | Result,\n ...args: Args\n): Result => (typeof input === 'function' ? (input as (...args: Args) => Result)(...args) : input);\n","export const isString = (value: unknown): value is string => typeof value === 'string';\n\nexport const isNumber = (value: unknown): value is number => typeof value === 'number';\n\nexport const isBool = (value: unknown): value is boolean => typeof value === 'boolean';\n\nexport const isObject = (value: unknown): value is object => typeof value === 'object';\n\nexport const isFunction = (value: unknown) => typeof value === 'function';\n\nexport const isPromise = <T = unknown>(value: unknown): value is Promise<T> =>\n isFunction((value as Promise<T>)?.then);\n\n/**\n * Checks if a value is null or undefined.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is `null` or `undefined`, otherwise `false`.\n */\nexport const isNil = (value: unknown): value is null | undefined =>\n value === undefined || value === null;\n\n/**\n * Checks whether the provided value is considered \"empty\".\n *\n * A value is considered empty if it is:\n * - `null`\n * - `undefined`\n * - `''`\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is empty; otherwise, `false`.\n */\nexport const isNilOrEmptyString = (value: unknown): value is null | undefined =>\n value === '' || isNil(value);\n","/**\n * Calculates the Euclidean distance between two points in 2D space.\n *\n * @param startX - The X coordinate of the starting point.\n * @param startY - The Y coordinate of the starting point.\n * @param endX - The X coordinate of the ending point.\n * @param endY - The Y coordinate of the ending point.\n *\n * @returns The Euclidean distance between the two points.\n */\nexport const calculateEuclideanDistance = (\n startX: number,\n startY: number,\n endX: number,\n endY: number,\n): number => {\n const deltaX = endX - startX;\n const deltaY = endY - startY;\n\n return Math.sqrt(deltaX ** 2 + deltaY ** 2);\n};\n\n/**\n * Calculates the moving speed.\n *\n * @param delta - The change in position (distance).\n * @param elapsedTime - The time taken to move the distance.\n *\n * @returns The calculated speed, which is the absolute value of delta divided by elapsed time.\n */\nexport const calculateMovingSpeed = (delta: number, elapsedTime: number): number =>\n Math.abs(delta / elapsedTime);\n\n/**\n * Calculates the specified percentage of a given value.\n *\n * @param value - The value to calculate the percentage of.\n * @param percentage - The percentage to calculate.\n *\n * @returns The calculated percentage of the value.\n */\nexport const calculatePercentage = (value: number, percentage: number): number => {\n return (value * percentage) / 100;\n};\n","interface HTMLElementTransformationValues {\n translateX: number;\n translateY: number;\n}\n\n/**\n * Get various transformation values from the transformation matrix of an element.\n *\n * @param element - The element with a transformation applied.\n *\n * @returns An object containing transformation values.\n */\nexport const getTransformationValues = (element: HTMLElement): HTMLElementTransformationValues => {\n const computedStyles = window.getComputedStyle(element);\n const transformValue = computedStyles.getPropertyValue('transform');\n\n const matrix = transformValue.match(/^matrix\\((.+)\\)$/);\n if (!matrix) {\n return {\n translateX: 0,\n translateY: 0,\n };\n }\n\n const transformMatrix = matrix[1].split(', ');\n\n const translateX = parseFloat(transformMatrix[4]);\n const translateY = parseFloat(transformMatrix[5]);\n\n return {\n translateX,\n translateY,\n };\n};\n","export * from './string';\nexport * from './array';\nexport * from './function';\nexport * from './guards';\nexport * from './math';\nexport * from './dom';\n\nexport function assert(condition: any, message: string): asserts condition {\n if (!condition) {\n throw new Error(message);\n }\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","toKebabCase","input","replace","toLowerCase","camelToDashCase","letter","splitStringIntoWords","split","filter","Boolean","hashString","hash","i","length","charCodeAt","toString","boolFilter","array","noop","invokeIfFunction","args","isString","isNumber","isBool","isObject","isFunction","isPromise","then","isNil","isNilOrEmptyString","calculateEuclideanDistance","startX","startY","endX","endY","deltaX","deltaY","Math","sqrt","calculateMovingSpeed","delta","elapsedTime","abs","calculatePercentage","percentage","getTransformationValues","element","matrix","window","getComputedStyle","getPropertyValue","match","translateX","translateY","transformMatrix","parseFloat","assert","condition","message","Error"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"index.cjs","mappings":"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","sources":["webpack://@react-hive/honey-utils/webpack/bootstrap","webpack://@react-hive/honey-utils/webpack/runtime/define property getters","webpack://@react-hive/honey-utils/webpack/runtime/hasOwnProperty shorthand","webpack://@react-hive/honey-utils/webpack/runtime/make namespace object","webpack://@react-hive/honey-utils/./src/string.ts","webpack://@react-hive/honey-utils/./src/guards.ts","webpack://@react-hive/honey-utils/./src/array.ts","webpack://@react-hive/honey-utils/./src/function.ts","webpack://@react-hive/honey-utils/./src/math.ts","webpack://@react-hive/honey-utils/./src/dom.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Converts a string to kebab-case format.\n *\n * This function transforms camelCase or PascalCase strings into kebab-case by inserting\n * hyphens between lowercase and uppercase letters, then converting everything to lowercase.\n *\n * @param input - The string to convert to kebab-case.\n *\n * @returns The kebab-case formatted string.\n *\n * @example\n * ```ts\n * toKebabCase('helloWorld'); // → 'hello-world'\n * toKebabCase('HelloWorld'); // → 'hello-world'\n * toKebabCase('hello123World'); // → 'hello123-world'\n * ```\n */\nexport const toKebabCase = (input: string): string =>\n input.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts a camelCase string to dash-case format.\n *\n * This function transforms camelCase strings into dash-case by inserting\n * hyphens before uppercase letters and converting them to lowercase.\n * The function ensures that no hyphen is added at the start of the output string,\n * even if the input begins with an uppercase letter.\n *\n * @param input - The camelCase string to convert to dash-case.\n *\n * @returns The dash-case formatted string.\n *\n * @example\n * ```ts\n * camelToDashCase('helloWorld'); // → 'hello-world'\n * camelToDashCase('HelloWorld'); // → 'hello-world'\n * camelToDashCase('backgroundColor'); // → 'background-color'\n * ```\n */\nexport const camelToDashCase = (input: string): string => {\n // First handle the first character separately to avoid adding a hyphen at the start\n const firstChar = input.charAt(0);\n const restOfString = input.slice(1);\n \n // Convert the first character to lowercase without adding a hyphen\n const firstCharProcessed = firstChar.toLowerCase();\n \n // Process the rest of the string normally, adding hyphens before uppercase letters\n const restProcessed = restOfString.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);\n \n return firstCharProcessed + restProcessed;\n};\n\n/**\n * Splits a string into an array of filtered from redundant spaces words.\n *\n * @param input - The input string to be split.\n *\n * @returns An array of words from the input string.\n */\nexport const splitStringIntoWords = (input: string): string[] => input.split(' ').filter(Boolean);\n\n/**\n * Generates a short, consistent hash string from an input string using a DJB2-inspired algorithm.\n *\n * This function uses a variation of the DJB2 algorithm, which is a simple yet effective hashing algorithm\n * based on bitwise XOR (`^`) and multiplication by 33. It produces a non-negative 32-bit integer,\n * which is then converted to a base-36 string (digits + lowercase letters) to produce a compact output.\n *\n * Useful for:\n * - Generating stable class names in CSS-in-JS libraries.\n * - Producing consistent cache keys.\n * - Quick and lightweight hashing needs where cryptographic security is not required.\n *\n * ⚠️ This is not cryptographically secure and should not be used for hashing passwords or sensitive data.\n *\n * @param input - The input string to hash.\n *\n * @returns A short, base-36 encoded hash string.\n *\n * @example\n * ```ts\n * const className = hashString('background-color: red;');\n * // → 'e4k1z0x'\n * ```\n */\nexport const hashString = (input: string): string => {\n let hash = 5381;\n\n for (let i = 0; i < input.length; i++) {\n hash = (hash * 33) ^ input.charCodeAt(i);\n }\n\n return (hash >>> 0).toString(36);\n};\n","export function assert(condition: any, message: string): asserts condition {\n if (!condition) {\n throw new Error(message);\n }\n}\n\n/**\n * Checks if a value is null.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is null; otherwise, `false`.\n */\nexport const isNull = (value: unknown): value is null => value === null;\n\n/**\n * Checks if a value is a string.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a string; otherwise, `false`.\n */\nexport const isString = (value: unknown): value is string => typeof value === 'string';\n\n/**\n * Checks if a value is a number.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a number; otherwise, `false`.\n */\nexport const isNumber = (value: unknown): value is number => typeof value === 'number';\n\n/**\n * Checks if a value is a boolean.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a boolean; otherwise, `false`.\n */\nexport const isBool = (value: unknown): value is boolean => typeof value === 'boolean';\n\n/**\n * Checks if a value is an object.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is an object; otherwise, `false`.\n */\nexport const isObject = (value: unknown): value is object => typeof value === 'object';\n\n/**\n * Checks if a value is an empty object (no own enumerable properties).\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is an empty object; otherwise, `false`.\n */\nexport const isEmptyObject = (value: unknown): value is Record<string, never> =>\n isObject(value) && !isNull(value) && Object.keys(value).length === 0;\n\n/**\n * Checks if a value is an array.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is an array; otherwise, `false`.\n */\nexport const isArray = (value: unknown): value is unknown[] => Array.isArray(value);\n\n/**\n * Checks if a value is an empty array.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is an empty array; otherwise, `false`.\n */\nexport const isEmptyArray = (value: unknown): value is [] => isArray(value) && value.length === 0;\n\n/**\n * Checks if a value is a function.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a function; otherwise, `false`.\n */\nexport const isFunction = (value: unknown) => typeof value === 'function';\n\n/**\n * Checks if a value is a Promise.\n *\n * @template T - The type of the value that the Promise resolves to.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a Promise; otherwise, `false`.\n */\nexport const isPromise = <T = unknown>(value: unknown): value is Promise<T> =>\n isFunction((value as Promise<T>)?.then);\n\n/**\n * Checks if a value is null or undefined.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is `null` or `undefined`, otherwise `false`.\n */\nexport const isNil = (value: unknown): value is null | undefined =>\n value === undefined || value === null;\n\n/**\n * Checks whether the provided value is considered \"empty\".\n *\n * A value is considered empty if it is:\n * - `null`\n * - `undefined`\n * - `''`\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is empty; otherwise, `false`.\n */\nexport const isNilOrEmptyString = (value: unknown): value is null | undefined =>\n value === '' || isNil(value);\n\n/**\n * Checks if a value is a Date object.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a Date object; otherwise, `false`.\n */\nexport const isDate = (value: unknown): value is Date => value instanceof Date;\n\n/**\n * Checks if a value is a valid Date object (not Invalid Date).\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a valid Date object; otherwise, `false`.\n */\nexport const isValidDate = (value: unknown): value is Date =>\n isDate(value) && !isNaN(value.getTime());\n\n/**\n * Checks if a value is a RegExp object.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a RegExp object; otherwise, `false`.\n */\nexport const isRegExp = (value: unknown): value is RegExp => value instanceof RegExp;\n\n/**\n * Checks if a value is a Map.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a Map; otherwise, `false`.\n */\nexport const isMap = (value: unknown): value is Map<unknown, unknown> => value instanceof Map;\n\n/**\n * Checks if a value is a Set.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a Set; otherwise, `false`.\n */\nexport const isSet = (value: unknown): value is Set<unknown> => value instanceof Set;\n\n/**\n * Checks if a value is a Symbol.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a Symbol; otherwise, `false`.\n */\nexport const isSymbol = (value: unknown): value is symbol => typeof value === 'symbol';\n\n/**\n * Checks if a value is undefined.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is undefined; otherwise, `false`.\n */\nexport const isUndefined = (value: unknown): value is undefined => value === undefined;\n\n/**\n * Checks if a value is a finite number.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is a finite number; otherwise, `false`.\n */\nexport const isFiniteNumber = (value: unknown): value is number =>\n isNumber(value) && isFinite(value);\n\n/**\n * Checks if a value is an integer.\n *\n * @param value - The value to check.\n *\n * @returns `true` if the value is an integer; otherwise, `false`.\n */\nexport const isInteger = (value: unknown): value is number =>\n isNumber(value) && Number.isInteger(value);\n","import { assert } from './guards';\n\n/**\n * Filters out `null`, `undefined`, and other falsy values from an array,\n * returning a typed array of only truthy `Item` values.\n *\n * Useful when working with optional or nullable items that need to be sanitized.\n *\n * @template T - The type of the items in the array.\n *\n * @param array - An array of items that may include `null`, `undefined`, or falsy values.\n *\n * @returns A new array containing only truthy `Item` values.\n */\nexport const boolFilter = <T>(array: (T | false | null | undefined)[]): T[] =>\n array.filter(Boolean) as T[];\n\n/**\n * Returns a new array with duplicate values removed.\n *\n * Uses Set for efficient duplicate removal while preserving the original order.\n *\n * @template T - The type of the items in the array.\n *\n * @param array - The input array that may contain duplicate values.\n *\n * @returns A new array with only unique values, maintaining the original order.\n *\n * @example\n * ```ts\n * unique([1, 2, 2, 3, 1, 4]); // [1, 2, 3, 4]\n * unique(['a', 'b', 'a', 'c']); // ['a', 'b', 'c']\n * ```\n */\nexport const unique = <T>(array: T[]): T[] => [...new Set(array)];\n\n/**\n * Splits an array into chunks of the specified size.\n *\n * Useful for pagination, batch processing, or creating grid layouts.\n *\n * @template T - The type of the items in the array.\n *\n * @param array - The input array to be chunked.\n * @param size - The size of each chunk. Must be greater than 0.\n *\n * @returns An array of chunks, where each chunk is an array of the specified size\n * (except possibly the last chunk, which may be smaller).\n *\n * @example\n * ```ts\n * chunk([1, 2, 3, 4, 5], 2); // [[1, 2], [3, 4], [5]]\n * chunk(['a', 'b', 'c', 'd'], 3); // [['a', 'b', 'c'], ['d']]\n * ```\n */\nexport const chunk = <T>(array: T[], size: number): T[][] => {\n assert(size > 0, 'Chunk size must be greater than 0');\n\n return Array.from({ length: Math.ceil(array.length / size) }, (_, index) =>\n array.slice(index * size, (index + 1) * size),\n );\n};\n\n/**\n * Returns an array containing elements that exist in all provided arrays.\n *\n * @template T - The type of the items in the arrays.\n *\n * @param arrays - Two or more arrays to find common elements from.\n *\n * @returns A new array containing only the elements that exist in all input arrays.\n *\n * @example\n * ```ts\n * intersection([1, 2, 3], [2, 3, 4]); // [2, 3]\n * intersection(['a', 'b', 'c'], ['b', 'c', 'd'], ['b', 'e']); // ['b']\n * ```\n */\nexport const intersection = <T>(...arrays: T[][]): T[] => {\n if (arrays.length === 0) {\n return [];\n }\n\n if (arrays.length === 1) {\n return [...arrays[0]];\n }\n\n const [first, ...rest] = arrays;\n const uniqueFirst = unique(first);\n\n return uniqueFirst.filter(item => rest.every(array => array.includes(item)));\n};\n\n/**\n * Returns elements from the first array that don't exist in the second array.\n *\n * @template T - The type of the items in the arrays.\n *\n * @param array - The source array.\n * @param exclude - The array containing elements to exclude.\n *\n * @returns A new array with elements from the first array that don't exist in the second array.\n *\n * @example\n * ```ts\n * difference([1, 2, 3, 4], [2, 4]); // [1, 3]\n * difference(['a', 'b', 'c'], ['b']); // ['a', 'c']\n * ```\n */\nexport const difference = <T>(array: T[], exclude: T[]): T[] =>\n array.filter(item => !exclude.includes(item));\n","export const noop = () => {};\n\n/**\n * Invokes the given input if it is a function, passing the provided arguments.\n * Otherwise, returns the input as-is.\n *\n * @template Args - Tuple of argument types to pass to the function.\n * @template Result - Return type of the function or the value.\n *\n * @param input - A function to invoke with `args`, or a direct value of type `Result`.\n * @param args - Arguments to pass if `input` is a function.\n *\n * @returns The result of invoking the function, or the original value if it's not a function.\n */\nexport const invokeIfFunction = <Args extends any[], Result>(\n input: ((...args: Args) => Result) | Result,\n ...args: Args\n): Result => (typeof input === 'function' ? (input as (...args: Args) => Result)(...args) : input);\n","/**\n * Calculates the Euclidean distance between two points in 2D space.\n *\n * @param startX - The X coordinate of the starting point.\n * @param startY - The Y coordinate of the starting point.\n * @param endX - The X coordinate of the ending point.\n * @param endY - The Y coordinate of the ending point.\n *\n * @returns The Euclidean distance between the two points.\n */\nexport const calculateEuclideanDistance = (\n startX: number,\n startY: number,\n endX: number,\n endY: number,\n): number => {\n const deltaX = endX - startX;\n const deltaY = endY - startY;\n\n return Math.sqrt(deltaX ** 2 + deltaY ** 2);\n};\n\n/**\n * Calculates the moving speed.\n *\n * @param delta - The change in position (distance).\n * @param elapsedTime - The time taken to move the distance.\n *\n * @returns The calculated speed, which is the absolute value of delta divided by elapsed time.\n */\nexport const calculateMovingSpeed = (delta: number, elapsedTime: number): number =>\n Math.abs(delta / elapsedTime);\n\n/**\n * Calculates the specified percentage of a given value.\n *\n * @param value - The value to calculate the percentage of.\n * @param percentage - The percentage to calculate.\n *\n * @returns The calculated percentage of the value.\n */\nexport const calculatePercentage = (value: number, percentage: number): number => {\n return (value * percentage) / 100;\n};\n","interface HTMLElementTransformationValues {\n translateX: number;\n translateY: number;\n}\n\n/**\n * Get various transformation values from the transformation matrix of an element.\n *\n * @param element - The element with a transformation applied.\n *\n * @returns An object containing transformation values.\n */\nexport const getTransformationValues = (element: HTMLElement): HTMLElementTransformationValues => {\n const computedStyles = window.getComputedStyle(element);\n const transformValue = computedStyles.getPropertyValue('transform');\n\n const matrix = transformValue.match(/^matrix\\((.+)\\)$/);\n if (!matrix) {\n return {\n translateX: 0,\n translateY: 0,\n };\n }\n\n const transformMatrix = matrix[1].split(', ');\n\n const translateX = parseFloat(transformMatrix[4]);\n const translateY = parseFloat(transformMatrix[5]);\n\n return {\n translateX,\n translateY,\n };\n};\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","toKebabCase","input","replace","toLowerCase","camelToDashCase","firstChar","charAt","restOfString","slice","letter","splitStringIntoWords","split","filter","Boolean","hashString","hash","i","length","charCodeAt","toString","assert","condition","message","Error","isNull","isString","isNumber","isBool","isObject","isEmptyObject","keys","isArray","Array","isEmptyArray","isFunction","isPromise","then","isNil","isNilOrEmptyString","isDate","Date","isValidDate","isNaN","getTime","isRegExp","RegExp","isMap","Map","isSet","Set","isSymbol","isUndefined","undefined","isFiniteNumber","isFinite","isInteger","Number","boolFilter","array","unique","chunk","size","from","Math","ceil","_","index","intersection","arrays","first","rest","item","every","includes","difference","exclude","noop","invokeIfFunction","args","calculateEuclideanDistance","startX","startY","endX","endY","deltaX","deltaY","sqrt","calculateMovingSpeed","delta","elapsedTime","abs","calculatePercentage","percentage","getTransformationValues","element","matrix","window","getComputedStyle","getPropertyValue","match","translateX","translateY","transformMatrix","parseFloat"],"sourceRoot":""}
|
package/dist/index.d.ts
CHANGED