@@ -89,7 +89,7 @@ The `partitionObjectsByKey` function splits an array of objects into two separat
89
89
90
90
### Example Usage
91
91
``` typescript
92
- import { partitionObjectsByKey } from ' @xmanscript/utils' ;
92
+ import partitionObjectsByKey from ' @xmanscript/utils/partitionObjectsByKey ' ;
93
93
94
94
const array = [
95
95
{ id: 1 , name: ' Alice' },
@@ -125,7 +125,7 @@ The `convertNestedKeysToObject` function converts an input object with nested ke
125
125
126
126
### Example Usage
127
127
``` typescript
128
- import { convertNestedKeysToObject } from ' @xmanscript/utils' ;
128
+ import convertNestedKeysToObject from ' @xmanscript/utils/convertNestedKeysToObject ' ;
129
129
130
130
const input = {
131
131
' user[0].name' : ' Alice' ,
@@ -161,7 +161,7 @@ The `markCheckedByStringMatch` function adds a "checked" field to each object in
161
161
162
162
### Example Usage
163
163
``` typescript
164
- import { markCheckedByStringMatch } from ' @xmanscript/utils' ;
164
+ import markCheckedByStringMatch from ' @xmanscript/utils/markCheckedByStringMatch ' ;
165
165
166
166
interface Item {
167
167
id: number ;
@@ -199,7 +199,7 @@ The `intersectObjects` function takes two objects as input and returns a new obj
199
199
200
200
### Example Usage
201
201
``` typescript
202
- import { intersectObjects } from ' @xmanscript/utils' ;
202
+ import intersectObjects from ' @xmanscript/utils/intersectObjects ' ;
203
203
204
204
const object1 = {
205
205
name: ' John' ,
@@ -230,7 +230,7 @@ The `containsBinaryData` function recursively checks if an object or any of its
230
230
231
231
### Example Usage
232
232
``` typescript
233
- import { containsBinaryData } from ' @xmanscript/utils' ;
233
+ import containsBinaryData from ' @xmanscript/utils/containsBinaryData ' ;
234
234
235
235
const objectWithBinaryData = {
236
236
image: new Blob ([' binary data' ], { type: ' image/png' }),
@@ -263,7 +263,7 @@ The `isJSONObject` function checks if a given string is a valid JSON object.
263
263
264
264
### Example Usage
265
265
` ` ` typescript
266
- import { isJSONObject } from '@xmanscript/utils';
266
+ import isJSONObject from '@xmanscript/utils/isJSONObject ';
267
267
268
268
const jsonString1 = '{"name": "John", "age": 30}';
269
269
const jsonString2 = 'This is not a JSON object';
@@ -284,7 +284,7 @@ The `objectToFormDataWithFiles` function converts a JSON object into a FormData
284
284
285
285
### Example Usage
286
286
` ` ` typescript
287
- import { objectToFormDataWithFiles } from '@xmanscript/utils';
287
+ import objectToFormDataWithFiles from '@xmanscript/utils/objectToFormDataWithFiles ';
288
288
289
289
const formData = objectToFormDataWithFiles({
290
290
name: 'John',
@@ -312,7 +312,7 @@ The `areObjectsEqual` function checks if two objects are equal by comparing thei
312
312
313
313
### Example Usage
314
314
` ` ` typescript
315
- import { areObjectsEqual } from '@xmanscript/utils';
315
+ import areObjectsEqual from '@xmanscript/utils/areObjectsEqual ';
316
316
317
317
const obj1 = { name: 'John', age: 30 };
318
318
const obj2 = { age: 30, name: 'John' };
@@ -333,7 +333,7 @@ The `abbreviateCurrencyValue` function converts a number into a currency system
333
333
334
334
### Example Usage
335
335
` ` ` typescript
336
- import { abbreviateCurrencyValue } from '@xmanscript/utils';
336
+ import abbreviateCurrencyValue from '@xmanscript/utils/abbreviateCurrencyValue ';
337
337
338
338
const value1 = 1500000000; // 1.5 billion
339
339
const value2 = 7500000; // 7.5 million
@@ -359,7 +359,7 @@ The `omitKey` function removes a specified key from an object and returns a new
359
359
360
360
### Example Usage
361
361
` ` ` typescript
362
- import { omitKey } from '@xmanscript/utils';
362
+ import omitKey from '@xmanscript/utils/omitKey ';
363
363
364
364
const user = {
365
365
id: 1,
@@ -386,7 +386,7 @@ The `setKeysToValueInObjects` function takes an array of objects and an array of
386
386
387
387
### Example Usage
388
388
` ` ` typescript
389
- import { setKeysToValueInObjects } from '@xmanscript/utils';
389
+ import setKeysToValueInObjects from '@xmanscript/utils/setKeysToValueInObjects ';
390
390
391
391
const data = [
392
392
{ id: 1, value1: 10, value2: 20 },
@@ -414,7 +414,7 @@ The `toggleStringInArray` function removes the target string from the array if i
414
414
415
415
### Example Usage
416
416
` ` ` typescript
417
- import { toggleStringInArray } from '@xmanscript/utils';
417
+ import toggleStringInArray from '@xmanscript/utils/toggleStringInArray ';
418
418
419
419
const myArray = ['apple', 'banana', 'cherry'];
420
420
@@ -440,7 +440,7 @@ The `toggleObjectInArray` function removes the target object from the array if i
440
440
441
441
### Example Usage
442
442
` ` ` typescript
443
- import { toggleObjectInArray } from '@xmanscript/utils';
443
+ import toggleObjectInArray from '@xmanscript/utils/toggleObjectInArray ';
444
444
445
445
const data = [
446
446
{ id: 1, name: 'Alice' },
@@ -468,7 +468,7 @@ The `calculateAndInjectPercentageByMaxValue` function calculates the percentage
468
468
469
469
### Example Usage
470
470
` ` ` typescript
471
- import { calculateAndInjectPercentageByMaxValue } from '@xmanscript/utils';
471
+ import calculateAndInjectPercentageByMaxValue from '@xmanscript/utils/calculateAndInjectPercentageByMaxValue ';
472
472
473
473
const data = [
474
474
{ name: 'A', value: 50 },
@@ -499,7 +499,7 @@ The `calculateAndInjectPercentageBySum` function calculates the percentage of a
499
499
500
500
### Example Usage
501
501
` ` ` typescript
502
- import { calculateAndInjectPercentageBySum } from '@xmanscript/utils';
502
+ import calculateAndInjectPercentageBySum from '@xmanscript/utils/calculateAndInjectPercentageBySum ';
503
503
504
504
const data = [
505
505
{ name: 'A', value: 25 },
@@ -532,7 +532,7 @@ The `calculateSumOfKey` function calculates the sum of a specified key in an arr
532
532
533
533
### Example Usage
534
534
` ` ` typescript
535
- import { calculateSumOfKey } from '@xmanscript/utils';
535
+ import calculateSumOfKey from '@xmanscript/utils/calculateSumOfKey ';
536
536
537
537
const data = [
538
538
{ value: 10 },
@@ -561,7 +561,7 @@ The `setValueOfKeyForMatchingValuesOfAKey` function changes the 'value' property
561
561
562
562
### Example Usage
563
563
` ` ` typescript
564
- import { setValueOfKeyForMatchingValuesOfAKey } from '@xmanscript/utils';
564
+ import setValueOfKeyForMatchingValuesOfAKey from '@xmanscript/utils/setValueOfKeyForMatchingValuesOfAKey ';
565
565
566
566
const data = [
567
567
{ name: 'A', code: 'x', value:100 },
@@ -594,7 +594,7 @@ The `scrollToComponent` function scrolls to a specified component on the page an
594
594
595
595
### Example Usage
596
596
` ` ` typescript
597
- import { scrollToComponent } from '@xmanscript/utils';
597
+ import scrollToComponent from '@xmanscript/utils/scrollToComponent ';
598
598
599
599
// Scroll to component with id "myComponent" and focus on it after scrolling. There is no delay in scrolling and focusing by default.
600
600
scrollToComponent({ componentId: 'myComponent', focusAfterScroll: true, scrollDelay:100, focusDelay:100 });
@@ -613,7 +613,7 @@ The `distributePercentageEquallyWithRemainder` function divides a given percenta
613
613
614
614
### Example Usage
615
615
` ` ` typescript
616
- import { distributePercentageEquallyWithRemainder } from '@xmanscript/utils';
616
+ import distributePercentageEquallyWithRemainder from '@xmanscript/utils/distributePercentageEquallyWithRemainder ';
617
617
618
618
const partsToDivide = [
619
619
{ id: 30 },
@@ -643,7 +643,7 @@ The `splitArrayIntoChunks` function splits an array into multiple arrays of a sp
643
643
644
644
### Example Usage
645
645
` ` ` typescript
646
- import { splitArrayIntoChunks } from '@xmanscript/utils';
646
+ import splitArrayIntoChunks from '@xmanscript/utils/splitArrayIntoChunks ';
647
647
648
648
const originalArray = [
649
649
{ id: 1, name: 'Item 1' },
@@ -677,7 +677,7 @@ The `getFileExtension` function takes a URL as input and returns the file extens
677
677
678
678
### Example Usage
679
679
` ` ` typescript
680
- import { getFileExtension } from '@xmanscript/utils';
680
+ import getFileExtension from '@xmanscript/utils/getFileExtension ';
681
681
682
682
const url1 = 'https://example.com/image.jpg';
683
683
const url2 = 'https://example.com/document.pdf';
@@ -702,7 +702,7 @@ The `removeObjectFromArray` function removes a specified object from an array of
702
702
703
703
### Example Usage
704
704
` ` ` typescript
705
- import { removeObjectFromArray } from '@xmanscript/utils';
705
+ import removeObjectFromArray from '@xmanscript/utils/removeObjectFromArray ';
706
706
707
707
const array = [
708
708
{ id: 1, name: 'Alice' },
@@ -733,7 +733,7 @@ The `parseToBoolean` function takes a string value and returns a boolean value b
733
733
734
734
### Example Usage
735
735
` ` ` typescript
736
- import { parseToBoolean } from '@xmanscript/utils';
736
+ import parseToBoolean from '@xmanscript/utils/parseToBoolean ';
737
737
738
738
const result1 = parseToBoolean('true');
739
739
// Result: true
@@ -757,7 +757,7 @@ The `groupArrayOfObjectsByValueOfAKey` function takes an array of objects and a
757
757
758
758
### Example Usage
759
759
` ` ` typescript
760
- import { groupArrayOfObjectsByValueOfAKey } from '@xmanscript/utils';
760
+ import groupArrayOfObjectsByValueOfAKey from '@xmanscript/utils/groupArrayOfObjectsByValueOfAKey ';
761
761
762
762
const data = [
763
763
{ category: 'A', value: 1 },
@@ -784,7 +784,7 @@ The `countKeyOccurrences` function counts the number of occurrences of a specifi
784
784
785
785
### Example Usage
786
786
` ` ` typescript
787
- import { countKeyOccurrences } from '@xmanscript/utils';
787
+ import countKeyOccurrences from '@xmanscript/utils/countKeyOccurrences ';
788
788
789
789
const jsonObject = {
790
790
key1: 'value',
@@ -811,7 +811,7 @@ The `distributePercentageEqually` function takes a JSON object and a key, and up
811
811
812
812
### Example Usage
813
813
` ` ` typescript
814
- import { distributePercentageEqually } from '@xmanscript/utils';
814
+ import distributePercentageEqually from '@xmanscript/utils/distributePercentageEqually ';
815
815
816
816
const jsonObject = {
817
817
items: [
@@ -841,7 +841,7 @@ The `uniqueValuesOfKey` function is used to extract unique string values from a
841
841
### Example Usage
842
842
843
843
` ` ` typescript
844
- import { uniqueValuesOfKey } from '@xmanscript/utils';
844
+ import uniqueValuesOfKey from '@xmanscript/utils/uniqueValuesOfKey ';
845
845
846
846
const data = [
847
847
{ id: 1, name: 'John' },
@@ -865,7 +865,7 @@ The `formatNumberToCommaString` function converts a number to a comma-separated
865
865
866
866
### Example Usage
867
867
` ` ` typescript
868
- import { formatNumberToCommaString } from '@xmanscript/utils';
868
+ import formatNumberToCommaString from '@xmanscript/utils/formatNumberToCommaString ';
869
869
870
870
const number = 1234567.89;
871
871
const formattedNumber = formatNumberToCommaString(number);
@@ -888,7 +888,7 @@ The `getMinMax` function finds the minimum and maximum values of a specified key
888
888
889
889
### Example Usage
890
890
` ` ` typescript
891
- import { getMinMax } from '@xmanscript/utils';
891
+ import getMinMax from '@xmanscript/utils/getMinMax ';
892
892
893
893
const data = [
894
894
{ age: 25 },
@@ -914,7 +914,7 @@ The `getDifferenceObject` function finds the minimum and maximum values of a spe
914
914
915
915
### Example Usage
916
916
` ` ` typescript
917
- import { getDifferenceObject } from '@xmanscript/utils';
917
+ import getDifferenceObject from '@xmanscript/utils/getDifferenceObject ';
918
918
919
919
const obj1 = { name: 'john', family: 'deo' };
920
920
const obj1 = { name: 'john', family: { familyName: 'deo' } };
@@ -940,7 +940,7 @@ The `strictIntersectObjects` takes two objects as input and returns a new object
940
940
941
941
### Example Usage
942
942
` ` ` typescript
943
- import { strictIntersectObjects } from '@xmanscript/utils';
943
+ import strictIntersectObjects from '@xmanscript/utils/strictIntersectObjects ';
944
944
945
945
const object1 = {
946
946
name: 'John',
0 commit comments