@hairy/utils 1.33.0 → 1.35.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/dist/index.cjs +50 -6
- package/dist/index.d.ts +11 -2
- package/dist/index.global.js +46 -6
- package/dist/index.js +48 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -117,6 +117,7 @@ __export(index_exports, {
|
|
|
117
117
|
join: () => join_default,
|
|
118
118
|
jsonTryParse: () => jsonTryParse,
|
|
119
119
|
kebabCase: () => kebabCase,
|
|
120
|
+
keyBy: () => keyBy_default,
|
|
120
121
|
keys: () => keys_default,
|
|
121
122
|
loop: () => loop,
|
|
122
123
|
lt: () => lt,
|
|
@@ -145,6 +146,7 @@ __export(index_exports, {
|
|
|
145
146
|
riposte: () => riposte,
|
|
146
147
|
selectImages: () => selectImages,
|
|
147
148
|
sentenceCase: () => sentenceCase,
|
|
149
|
+
set: () => set_default,
|
|
148
150
|
showOpenFilePicker: () => showOpenFilePicker,
|
|
149
151
|
showOpenImagePicker: () => showOpenImagePicker,
|
|
150
152
|
slash: () => slash,
|
|
@@ -2084,9 +2086,9 @@ function mapToArray(map) {
|
|
|
2084
2086
|
var mapToArray_default = mapToArray;
|
|
2085
2087
|
|
|
2086
2088
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js
|
|
2087
|
-
function setToArray(
|
|
2088
|
-
var index = -1, result = Array(
|
|
2089
|
-
|
|
2089
|
+
function setToArray(set2) {
|
|
2090
|
+
var index = -1, result = Array(set2.size);
|
|
2091
|
+
set2.forEach(function(value) {
|
|
2090
2092
|
result[++index] = value;
|
|
2091
2093
|
});
|
|
2092
2094
|
return result;
|
|
@@ -2942,12 +2944,44 @@ function join(array, separator) {
|
|
|
2942
2944
|
}
|
|
2943
2945
|
var join_default = join;
|
|
2944
2946
|
|
|
2947
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keyBy.js
|
|
2948
|
+
var keyBy = createAggregator_default(function(result, value, key) {
|
|
2949
|
+
baseAssignValue_default(result, key, value);
|
|
2950
|
+
});
|
|
2951
|
+
var keyBy_default = keyBy;
|
|
2952
|
+
|
|
2945
2953
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.js
|
|
2946
2954
|
var merge = createAssigner_default(function(object, source, srcIndex) {
|
|
2947
2955
|
baseMerge_default(object, source, srcIndex);
|
|
2948
2956
|
});
|
|
2949
2957
|
var merge_default = merge;
|
|
2950
2958
|
|
|
2959
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSet.js
|
|
2960
|
+
function baseSet(object, path, value, customizer) {
|
|
2961
|
+
if (!isObject_default(object)) {
|
|
2962
|
+
return object;
|
|
2963
|
+
}
|
|
2964
|
+
path = castPath_default(path, object);
|
|
2965
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
2966
|
+
while (nested != null && ++index < length) {
|
|
2967
|
+
var key = toKey_default(path[index]), newValue = value;
|
|
2968
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
2969
|
+
return object;
|
|
2970
|
+
}
|
|
2971
|
+
if (index != lastIndex) {
|
|
2972
|
+
var objValue = nested[key];
|
|
2973
|
+
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
2974
|
+
if (newValue === void 0) {
|
|
2975
|
+
newValue = isObject_default(objValue) ? objValue : isIndex_default(path[index + 1]) ? [] : {};
|
|
2976
|
+
}
|
|
2977
|
+
}
|
|
2978
|
+
assignValue_default(nested, key, newValue);
|
|
2979
|
+
nested = nested[key];
|
|
2980
|
+
}
|
|
2981
|
+
return object;
|
|
2982
|
+
}
|
|
2983
|
+
var baseSet_default = baseSet;
|
|
2984
|
+
|
|
2951
2985
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiSize.js
|
|
2952
2986
|
var asciiSize = baseProperty_default("length");
|
|
2953
2987
|
var asciiSize_default = asciiSize;
|
|
@@ -2988,6 +3022,12 @@ function stringSize(string) {
|
|
|
2988
3022
|
}
|
|
2989
3023
|
var stringSize_default = stringSize;
|
|
2990
3024
|
|
|
3025
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set.js
|
|
3026
|
+
function set(object, path, value) {
|
|
3027
|
+
return object == null ? object : baseSet_default(object, path, value);
|
|
3028
|
+
}
|
|
3029
|
+
var set_default = set;
|
|
3030
|
+
|
|
2991
3031
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/truncate.js
|
|
2992
3032
|
var DEFAULT_TRUNC_LENGTH = 30;
|
|
2993
3033
|
var DEFAULT_TRUNC_OMISSION = "...";
|
|
@@ -3056,9 +3096,9 @@ function baseUniq(array, iteratee, comparator) {
|
|
|
3056
3096
|
isCommon = false;
|
|
3057
3097
|
includes = arrayIncludesWith_default;
|
|
3058
3098
|
} else if (length >= LARGE_ARRAY_SIZE2) {
|
|
3059
|
-
var
|
|
3060
|
-
if (
|
|
3061
|
-
return setToArray_default(
|
|
3099
|
+
var set2 = iteratee ? null : createSet_default(array);
|
|
3100
|
+
if (set2) {
|
|
3101
|
+
return setToArray_default(set2);
|
|
3062
3102
|
}
|
|
3063
3103
|
isCommon = false;
|
|
3064
3104
|
includes = cacheHas_default;
|
|
@@ -3354,6 +3394,8 @@ function parseNumeric(num, delimiters = ["t", "b", "m"]) {
|
|
|
3354
3394
|
return options || { v: 1, d: 0, n: "" };
|
|
3355
3395
|
}
|
|
3356
3396
|
function formatNumeric(value = "0", options) {
|
|
3397
|
+
if (options?.default && bignum(value).isZero())
|
|
3398
|
+
return options?.default;
|
|
3357
3399
|
const {
|
|
3358
3400
|
rounding = import_bignumber.default.ROUND_DOWN,
|
|
3359
3401
|
delimiters,
|
|
@@ -3733,6 +3775,7 @@ function call(fn, ...args) {
|
|
|
3733
3775
|
join,
|
|
3734
3776
|
jsonTryParse,
|
|
3735
3777
|
kebabCase,
|
|
3778
|
+
keyBy,
|
|
3736
3779
|
keys,
|
|
3737
3780
|
loop,
|
|
3738
3781
|
lt,
|
|
@@ -3761,6 +3804,7 @@ function call(fn, ...args) {
|
|
|
3761
3804
|
riposte,
|
|
3762
3805
|
selectImages,
|
|
3763
3806
|
sentenceCase,
|
|
3807
|
+
set,
|
|
3764
3808
|
showOpenFilePicker,
|
|
3765
3809
|
showOpenImagePicker,
|
|
3766
3810
|
slash,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { clone, cloneDeep, cloneDeepWith, cloneWith, concat, debounce, find, groupBy, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFunction, isInteger, isMap, isMatch, isMatchWith, isNaN, isNative, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp as isRegexp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, join, keys, merge, mergeWith, truncate, uniq, uniqBy, uniqWith, values } from 'lodash-es';
|
|
1
|
+
export { clone, cloneDeep, cloneDeepWith, cloneWith, concat, debounce, find, groupBy, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFunction, isInteger, isMap, isMatch, isMatchWith, isNaN, isNative, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp as isRegexp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, join, keyBy, keys, merge, mergeWith, set, truncate, uniq, uniqBy, uniqWith, values } from 'lodash-es';
|
|
2
2
|
import Bignumber from 'bignumber.js';
|
|
3
3
|
export { default as Bignumber } from 'bignumber.js';
|
|
4
4
|
|
|
@@ -108,6 +108,14 @@ type Option<L extends Key = 'label', V extends Key = 'value', C extends Key = 'c
|
|
|
108
108
|
} & {
|
|
109
109
|
[P in C]?: Option<L, V, C>[];
|
|
110
110
|
};
|
|
111
|
+
type OmitBy<T, V> = {
|
|
112
|
+
[K in keyof T as T[K] extends V ? never : K]: T[K];
|
|
113
|
+
};
|
|
114
|
+
type PickBy<T, U> = {
|
|
115
|
+
[K in keyof T as T[K] extends U ? K : never]: T[K];
|
|
116
|
+
};
|
|
117
|
+
type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
|
|
118
|
+
type Assign<T, U> = Omit<T, keyof U> & U;
|
|
111
119
|
|
|
112
120
|
declare function redirectTo(url: string, target?: string): void;
|
|
113
121
|
declare function dialsPhone(phoneNumber: string): void;
|
|
@@ -244,6 +252,7 @@ interface FormatNumericOptions {
|
|
|
244
252
|
rounding?: Bignumber.RoundingMode;
|
|
245
253
|
decimals?: number;
|
|
246
254
|
zeromove?: boolean;
|
|
255
|
+
default?: string;
|
|
247
256
|
format?: Bignumber.Format;
|
|
248
257
|
}
|
|
249
258
|
declare function bignum(n?: Numberish): Bignumber;
|
|
@@ -592,4 +601,4 @@ declare function unwrap<T extends object>(value: T | (() => T)): T;
|
|
|
592
601
|
declare function whenever<T, C extends (value: Exclude<T, null | undefined>) => any>(value: T, callback: C): ReturnType<C> | undefined;
|
|
593
602
|
declare function call<T extends Fn$1<any>>(fn: T, ...args: Parameters<T>): ReturnType<T>;
|
|
594
603
|
|
|
595
|
-
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, BIG_INTS, type BooleanLike, type ConstructorType, type DecimalOptions, type DeepKeyof, type DeepMerge, type DeepPartial, type DeepReadonly, type DeepReplace, type DeepRequired, Deferred, type Delimiter, type Dimension, type DynamicObject, type ElementOf, type Fn$1 as Fn, type FormatGroupOptions, type FormatNumericOptions, type IfAny, type IsAny, type Key, type Looper, type MergeInsertions, type Noop, type Nullable, type NumberObject, type Numberish, type Numeric, type NumericObject, type OpenFilePickerOptions, type OpenImagePickerOptions, type Option, type PromiseFn, type PromiseType, type Promisify, type ReaderType, type StringObject, type SymbolObject, type Typeof, arange, average, bignum, call, camelCase, capitalCase, compose, constantCase, cover, decimal, delay, dialsPhone, dotCase, downloadBlobFile, downloadNetworkFile, ensurePrefix, ensureSuffix, formToObject, formatNumeric, formatSize, formatUnit, getTypeof, gt, gte, integer, isAndroid, isBrowser, isChrome, isEdge, isFF, isFormData, isIE, isIE11, isIE9, isIOS, isMobile, isPhantomJS, isTruthy, isTypeof, isWeex, isWindow, jsonTryParse, kebabCase, loop, lt, lte, noCase, noop, numfix, objectToForm, off, on, parseNumeric, pascalCase, pascalSnakeCase, pathCase, percentage, pipe, plus, proxy, randomArray, randomNumber, randomString, readFileReader, redirectTo, riposte, selectImages, sentenceCase, showOpenFilePicker, showOpenImagePicker, slash, snakeCase, template, to, trainCase, unindent, unwrap, whenever, zerofill, zeromove };
|
|
604
|
+
export { type AnyFn, type ArgumentsType, type Arrayable, type Assign, type Awaitable, BIG_INTS, type BooleanLike, type ConstructorType, type DecimalOptions, type DeepKeyof, type DeepMerge, type DeepPartial, type DeepReadonly, type DeepReplace, type DeepRequired, Deferred, type Delimiter, type Dimension, type DynamicObject, type ElementOf, type Fn$1 as Fn, type FormatGroupOptions, type FormatNumericOptions, type IfAny, type IsAny, type Key, type Looper, type MergeInsertions, type Noop, type Nullable, type NumberObject, type Numberish, type Numeric, type NumericObject, type OmitBy, type OpenFilePickerOptions, type OpenImagePickerOptions, type Option, type Overwrite, type PickBy, type PromiseFn, type PromiseType, type Promisify, type ReaderType, type StringObject, type SymbolObject, type Typeof, arange, average, bignum, call, camelCase, capitalCase, compose, constantCase, cover, decimal, delay, dialsPhone, dotCase, downloadBlobFile, downloadNetworkFile, ensurePrefix, ensureSuffix, formToObject, formatNumeric, formatSize, formatUnit, getTypeof, gt, gte, integer, isAndroid, isBrowser, isChrome, isEdge, isFF, isFormData, isIE, isIE11, isIE9, isIOS, isMobile, isPhantomJS, isTruthy, isTypeof, isWeex, isWindow, jsonTryParse, kebabCase, loop, lt, lte, noCase, noop, numfix, objectToForm, off, on, parseNumeric, pascalCase, pascalSnakeCase, pathCase, percentage, pipe, plus, proxy, randomArray, randomNumber, randomString, readFileReader, redirectTo, riposte, selectImages, sentenceCase, showOpenFilePicker, showOpenImagePicker, slash, snakeCase, template, to, trainCase, unindent, unwrap, whenever, zerofill, zeromove };
|
package/dist/index.global.js
CHANGED
|
@@ -1919,9 +1919,9 @@
|
|
|
1919
1919
|
var mapToArray_default = mapToArray;
|
|
1920
1920
|
|
|
1921
1921
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js
|
|
1922
|
-
function setToArray(
|
|
1923
|
-
var index = -1, result = Array(
|
|
1924
|
-
|
|
1922
|
+
function setToArray(set2) {
|
|
1923
|
+
var index = -1, result = Array(set2.size);
|
|
1924
|
+
set2.forEach(function(value) {
|
|
1925
1925
|
result[++index] = value;
|
|
1926
1926
|
});
|
|
1927
1927
|
return result;
|
|
@@ -2777,12 +2777,44 @@
|
|
|
2777
2777
|
}
|
|
2778
2778
|
var join_default = join;
|
|
2779
2779
|
|
|
2780
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keyBy.js
|
|
2781
|
+
var keyBy = createAggregator_default(function(result, value, key) {
|
|
2782
|
+
baseAssignValue_default(result, key, value);
|
|
2783
|
+
});
|
|
2784
|
+
var keyBy_default = keyBy;
|
|
2785
|
+
|
|
2780
2786
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.js
|
|
2781
2787
|
var merge = createAssigner_default(function(object, source, srcIndex) {
|
|
2782
2788
|
baseMerge_default(object, source, srcIndex);
|
|
2783
2789
|
});
|
|
2784
2790
|
var merge_default = merge;
|
|
2785
2791
|
|
|
2792
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSet.js
|
|
2793
|
+
function baseSet(object, path, value, customizer) {
|
|
2794
|
+
if (!isObject_default(object)) {
|
|
2795
|
+
return object;
|
|
2796
|
+
}
|
|
2797
|
+
path = castPath_default(path, object);
|
|
2798
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
2799
|
+
while (nested != null && ++index < length) {
|
|
2800
|
+
var key = toKey_default(path[index]), newValue = value;
|
|
2801
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
2802
|
+
return object;
|
|
2803
|
+
}
|
|
2804
|
+
if (index != lastIndex) {
|
|
2805
|
+
var objValue = nested[key];
|
|
2806
|
+
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
2807
|
+
if (newValue === void 0) {
|
|
2808
|
+
newValue = isObject_default(objValue) ? objValue : isIndex_default(path[index + 1]) ? [] : {};
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
assignValue_default(nested, key, newValue);
|
|
2812
|
+
nested = nested[key];
|
|
2813
|
+
}
|
|
2814
|
+
return object;
|
|
2815
|
+
}
|
|
2816
|
+
var baseSet_default = baseSet;
|
|
2817
|
+
|
|
2786
2818
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiSize.js
|
|
2787
2819
|
var asciiSize = baseProperty_default("length");
|
|
2788
2820
|
var asciiSize_default = asciiSize;
|
|
@@ -2823,6 +2855,12 @@
|
|
|
2823
2855
|
}
|
|
2824
2856
|
var stringSize_default = stringSize;
|
|
2825
2857
|
|
|
2858
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set.js
|
|
2859
|
+
function set(object, path, value) {
|
|
2860
|
+
return object == null ? object : baseSet_default(object, path, value);
|
|
2861
|
+
}
|
|
2862
|
+
var set_default = set;
|
|
2863
|
+
|
|
2826
2864
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/truncate.js
|
|
2827
2865
|
var DEFAULT_TRUNC_LENGTH = 30;
|
|
2828
2866
|
var DEFAULT_TRUNC_OMISSION = "...";
|
|
@@ -2891,9 +2929,9 @@
|
|
|
2891
2929
|
isCommon = false;
|
|
2892
2930
|
includes = arrayIncludesWith_default;
|
|
2893
2931
|
} else if (length >= LARGE_ARRAY_SIZE2) {
|
|
2894
|
-
var
|
|
2895
|
-
if (
|
|
2896
|
-
return setToArray_default(
|
|
2932
|
+
var set2 = iteratee ? null : createSet_default(array);
|
|
2933
|
+
if (set2) {
|
|
2934
|
+
return setToArray_default(set2);
|
|
2897
2935
|
}
|
|
2898
2936
|
isCommon = false;
|
|
2899
2937
|
includes = cacheHas_default;
|
|
@@ -4532,6 +4570,8 @@
|
|
|
4532
4570
|
return options || { v: 1, d: 0, n: "" };
|
|
4533
4571
|
}
|
|
4534
4572
|
function formatNumeric(value = "0", options) {
|
|
4573
|
+
if (options?.default && bignum(value).isZero())
|
|
4574
|
+
return options?.default;
|
|
4535
4575
|
const {
|
|
4536
4576
|
rounding = bignumber_default.ROUND_DOWN,
|
|
4537
4577
|
delimiters,
|
package/dist/index.js
CHANGED
|
@@ -1917,9 +1917,9 @@ function mapToArray(map) {
|
|
|
1917
1917
|
var mapToArray_default = mapToArray;
|
|
1918
1918
|
|
|
1919
1919
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js
|
|
1920
|
-
function setToArray(
|
|
1921
|
-
var index = -1, result = Array(
|
|
1922
|
-
|
|
1920
|
+
function setToArray(set2) {
|
|
1921
|
+
var index = -1, result = Array(set2.size);
|
|
1922
|
+
set2.forEach(function(value) {
|
|
1923
1923
|
result[++index] = value;
|
|
1924
1924
|
});
|
|
1925
1925
|
return result;
|
|
@@ -2775,12 +2775,44 @@ function join(array, separator) {
|
|
|
2775
2775
|
}
|
|
2776
2776
|
var join_default = join;
|
|
2777
2777
|
|
|
2778
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keyBy.js
|
|
2779
|
+
var keyBy = createAggregator_default(function(result, value, key) {
|
|
2780
|
+
baseAssignValue_default(result, key, value);
|
|
2781
|
+
});
|
|
2782
|
+
var keyBy_default = keyBy;
|
|
2783
|
+
|
|
2778
2784
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.js
|
|
2779
2785
|
var merge = createAssigner_default(function(object, source, srcIndex) {
|
|
2780
2786
|
baseMerge_default(object, source, srcIndex);
|
|
2781
2787
|
});
|
|
2782
2788
|
var merge_default = merge;
|
|
2783
2789
|
|
|
2790
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSet.js
|
|
2791
|
+
function baseSet(object, path, value, customizer) {
|
|
2792
|
+
if (!isObject_default(object)) {
|
|
2793
|
+
return object;
|
|
2794
|
+
}
|
|
2795
|
+
path = castPath_default(path, object);
|
|
2796
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
2797
|
+
while (nested != null && ++index < length) {
|
|
2798
|
+
var key = toKey_default(path[index]), newValue = value;
|
|
2799
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
2800
|
+
return object;
|
|
2801
|
+
}
|
|
2802
|
+
if (index != lastIndex) {
|
|
2803
|
+
var objValue = nested[key];
|
|
2804
|
+
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
2805
|
+
if (newValue === void 0) {
|
|
2806
|
+
newValue = isObject_default(objValue) ? objValue : isIndex_default(path[index + 1]) ? [] : {};
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
assignValue_default(nested, key, newValue);
|
|
2810
|
+
nested = nested[key];
|
|
2811
|
+
}
|
|
2812
|
+
return object;
|
|
2813
|
+
}
|
|
2814
|
+
var baseSet_default = baseSet;
|
|
2815
|
+
|
|
2784
2816
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiSize.js
|
|
2785
2817
|
var asciiSize = baseProperty_default("length");
|
|
2786
2818
|
var asciiSize_default = asciiSize;
|
|
@@ -2821,6 +2853,12 @@ function stringSize(string) {
|
|
|
2821
2853
|
}
|
|
2822
2854
|
var stringSize_default = stringSize;
|
|
2823
2855
|
|
|
2856
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set.js
|
|
2857
|
+
function set(object, path, value) {
|
|
2858
|
+
return object == null ? object : baseSet_default(object, path, value);
|
|
2859
|
+
}
|
|
2860
|
+
var set_default = set;
|
|
2861
|
+
|
|
2824
2862
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/truncate.js
|
|
2825
2863
|
var DEFAULT_TRUNC_LENGTH = 30;
|
|
2826
2864
|
var DEFAULT_TRUNC_OMISSION = "...";
|
|
@@ -2889,9 +2927,9 @@ function baseUniq(array, iteratee, comparator) {
|
|
|
2889
2927
|
isCommon = false;
|
|
2890
2928
|
includes = arrayIncludesWith_default;
|
|
2891
2929
|
} else if (length >= LARGE_ARRAY_SIZE2) {
|
|
2892
|
-
var
|
|
2893
|
-
if (
|
|
2894
|
-
return setToArray_default(
|
|
2930
|
+
var set2 = iteratee ? null : createSet_default(array);
|
|
2931
|
+
if (set2) {
|
|
2932
|
+
return setToArray_default(set2);
|
|
2895
2933
|
}
|
|
2896
2934
|
isCommon = false;
|
|
2897
2935
|
includes = cacheHas_default;
|
|
@@ -3187,6 +3225,8 @@ function parseNumeric(num, delimiters = ["t", "b", "m"]) {
|
|
|
3187
3225
|
return options || { v: 1, d: 0, n: "" };
|
|
3188
3226
|
}
|
|
3189
3227
|
function formatNumeric(value = "0", options) {
|
|
3228
|
+
if (options?.default && bignum(value).isZero())
|
|
3229
|
+
return options?.default;
|
|
3190
3230
|
const {
|
|
3191
3231
|
rounding = Bignumber.ROUND_DOWN,
|
|
3192
3232
|
delimiters,
|
|
@@ -3565,6 +3605,7 @@ export {
|
|
|
3565
3605
|
join_default as join,
|
|
3566
3606
|
jsonTryParse,
|
|
3567
3607
|
kebabCase,
|
|
3608
|
+
keyBy_default as keyBy,
|
|
3568
3609
|
keys_default as keys,
|
|
3569
3610
|
loop,
|
|
3570
3611
|
lt,
|
|
@@ -3593,6 +3634,7 @@ export {
|
|
|
3593
3634
|
riposte,
|
|
3594
3635
|
selectImages,
|
|
3595
3636
|
sentenceCase,
|
|
3637
|
+
set_default as set,
|
|
3596
3638
|
showOpenFilePicker,
|
|
3597
3639
|
showOpenImagePicker,
|
|
3598
3640
|
slash,
|