rattail 1.6.2 → 1.6.3
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.d.mts +16 -16
- package/dist/index.mjs +12 -12
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -101,20 +101,6 @@ declare namespace index_d_exports$1 {
|
|
|
101
101
|
export { mitt, uuid, uuidV6 };
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
|
-
//#region src/util/maskText.d.ts
|
|
105
|
-
interface MaskTextOptions {
|
|
106
|
-
prefix?: number;
|
|
107
|
-
suffix?: number;
|
|
108
|
-
mask?: string;
|
|
109
|
-
maskLength?: number;
|
|
110
|
-
}
|
|
111
|
-
declare function maskText(text: string, {
|
|
112
|
-
prefix,
|
|
113
|
-
suffix,
|
|
114
|
-
mask,
|
|
115
|
-
maskLength
|
|
116
|
-
}?: MaskTextOptions): string;
|
|
117
|
-
//#endregion
|
|
118
104
|
//#region src/util/cancelAnimationFrame.d.ts
|
|
119
105
|
declare function cancelAnimationFrame(handle: number): void;
|
|
120
106
|
//#endregion
|
|
@@ -475,6 +461,20 @@ declare function toNumber(val: number | string | boolean | undefined | null): nu
|
|
|
475
461
|
//#region src/number/genNumberKey.d.ts
|
|
476
462
|
declare function genNumberKey(): number;
|
|
477
463
|
//#endregion
|
|
464
|
+
//#region src/string/maskString.d.ts
|
|
465
|
+
interface MaskStringOptions {
|
|
466
|
+
prefix?: number;
|
|
467
|
+
suffix?: number;
|
|
468
|
+
mask?: string;
|
|
469
|
+
maskLength?: number;
|
|
470
|
+
}
|
|
471
|
+
declare function maskString(text: string, {
|
|
472
|
+
prefix,
|
|
473
|
+
suffix,
|
|
474
|
+
mask,
|
|
475
|
+
maskLength
|
|
476
|
+
}?: MaskStringOptions): string;
|
|
477
|
+
//#endregion
|
|
478
478
|
//#region src/string/camelize.d.ts
|
|
479
479
|
declare function camelize(s: string): string;
|
|
480
480
|
//#endregion
|
|
@@ -564,7 +564,7 @@ declare function floor(val: number, precision?: number): number;
|
|
|
564
564
|
//#region src/math/ceil.d.ts
|
|
565
565
|
declare function ceil(val: number, precision?: number): number;
|
|
566
566
|
declare namespace index_d_exports {
|
|
567
|
-
export { BEM, ClassName, Classes, CookieAttributes, CookieStorage, CreateCacheManagerOptions, DurationContext, EnumOf, EnumOfConfigValue, EnumOfExtractOptionShape, EnumOfExtractValues, EnumOfKeyForValue, EnumOfNormalizeToOption, EnumOfOptionForValue, EnumOfResolvedField, EnumOfResolvedOption, EnumOfResult, EnumOfResultMethods, EnumOfStringOrGetter, EnumOfValue, EnumOfValueObject,
|
|
567
|
+
export { BEM, ClassName, Classes, CookieAttributes, CookieStorage, CreateCacheManagerOptions, DurationContext, EnumOf, EnumOfConfigValue, EnumOfExtractOptionShape, EnumOfExtractValues, EnumOfKeyForValue, EnumOfNormalizeToOption, EnumOfOptionForValue, EnumOfResolvedField, EnumOfResolvedOption, EnumOfResult, EnumOfResultMethods, EnumOfStringOrGetter, EnumOfValue, EnumOfValueObject, MaskStringOptions, Motion, MotionOptions, MotionState, NOOP, NavigationTarget, PromiseWithResolvers, Storage, assert, at, baseRound, buildNavigationUrl, call, callOrReturn, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createCacheManager, createCookieStorage, createNamespaceFn, createStorage, debounce, delay, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, enumOf, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasDuplicates, hasDuplicatesBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject, maskString, maxBy, mean, meanBy, merge, mergeWith, minBy, mitt, motion, navigation, normalizeToArray, objectEntries, objectKeys, objectToString, omit, omitBy, once, pascalCase, pick, pickBy, prettyJSONObject, preventDefault, promiseWithResolvers, raf, randomColor, randomNumber, randomString, removeArrayBlank, removeArrayEmpty, removeItem, removeItemBy, removeItemsBy, requestAnimationFrame, round, sample, sessionStorage, set, shuffle, slash, sum, sumBy, sumHash, supportTouch, throttle, times, toArrayBuffer, toDataURL, toNumber, toRawType, toText, toTypeString, toggleItem, tryParseJSON, uniq, uniqBy, upperFirst, uuid, uuidV6, xor, xorWith };
|
|
568
568
|
}
|
|
569
569
|
//#endregion
|
|
570
|
-
export { BEM, ClassName, Classes, CookieAttributes, CookieStorage, CreateCacheManagerOptions, DurationContext, EnumOf, EnumOfConfigValue, EnumOfExtractOptionShape, EnumOfExtractValues, EnumOfKeyForValue, EnumOfNormalizeToOption, EnumOfOptionForValue, EnumOfResolvedField, EnumOfResolvedOption, EnumOfResult, EnumOfResultMethods, EnumOfStringOrGetter, EnumOfValue, EnumOfValueObject,
|
|
570
|
+
export { BEM, ClassName, Classes, CookieAttributes, CookieStorage, CreateCacheManagerOptions, DurationContext, EnumOf, EnumOfConfigValue, EnumOfExtractOptionShape, EnumOfExtractValues, EnumOfKeyForValue, EnumOfNormalizeToOption, EnumOfOptionForValue, EnumOfResolvedField, EnumOfResolvedOption, EnumOfResult, EnumOfResultMethods, EnumOfStringOrGetter, EnumOfValue, EnumOfValueObject, MaskStringOptions, Motion, MotionOptions, MotionState, NOOP, NavigationTarget, PromiseWithResolvers, Storage, assert, at, baseRound, buildNavigationUrl, call, callOrReturn, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createCacheManager, createCookieStorage, createNamespaceFn, createStorage, debounce, delay, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, enumOf, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasDuplicates, hasDuplicatesBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject, maskString, maxBy, mean, meanBy, merge, mergeWith, minBy, mitt, motion, navigation, normalizeToArray, objectEntries, objectKeys, objectToString, omit, omitBy, once, pascalCase, pick, pickBy, prettyJSONObject, preventDefault, promiseWithResolvers, raf, randomColor, randomNumber, randomString, removeArrayBlank, removeArrayEmpty, removeItem, removeItemBy, removeItemsBy, requestAnimationFrame, round, sample, sessionStorage, set, shuffle, slash, sum, sumBy, sumHash, supportTouch, throttle, times, toArrayBuffer, toDataURL, toNumber, toRawType, toText, toTypeString, toggleItem, tryParseJSON, uniq, uniqBy, upperFirst, uuid, uuidV6, xor, xorWith };
|
package/dist/index.mjs
CHANGED
|
@@ -569,16 +569,6 @@ var integrated_exports = /* @__PURE__ */ __exportAll({
|
|
|
569
569
|
uuidV6: () => uuidV6
|
|
570
570
|
});
|
|
571
571
|
//#endregion
|
|
572
|
-
//#region src/util/maskText.ts
|
|
573
|
-
function maskText(text, { prefix = 2, suffix = 2, mask = "*", maskLength } = {}) {
|
|
574
|
-
if (text.length <= 1) return text;
|
|
575
|
-
const effectivePrefix = Math.min(prefix, text.length - 1);
|
|
576
|
-
const effectiveSuffix = Math.min(suffix, Math.max(text.length - effectivePrefix - 1, 0));
|
|
577
|
-
const count = maskLength ?? text.length - effectivePrefix - effectiveSuffix;
|
|
578
|
-
const suffixPart = effectiveSuffix > 0 ? text.slice(-effectiveSuffix) : "";
|
|
579
|
-
return text.slice(0, effectivePrefix) + mask.repeat(count) + suffixPart;
|
|
580
|
-
}
|
|
581
|
-
//#endregion
|
|
582
572
|
//#region src/util/cancelAnimationFrame.ts
|
|
583
573
|
function cancelAnimationFrame(handle) {
|
|
584
574
|
const globalThis = getGlobalThis();
|
|
@@ -609,6 +599,16 @@ function copyText(value) {
|
|
|
609
599
|
document.body.removeChild(textArea);
|
|
610
600
|
}
|
|
611
601
|
//#endregion
|
|
602
|
+
//#region src/string/maskString.ts
|
|
603
|
+
function maskString(text, { prefix = 2, suffix = 2, mask = "*", maskLength } = {}) {
|
|
604
|
+
if (text.length <= 1) return text;
|
|
605
|
+
const effectivePrefix = Math.min(prefix, text.length - 1);
|
|
606
|
+
const effectiveSuffix = Math.min(suffix, Math.max(text.length - effectivePrefix - 1, 0));
|
|
607
|
+
const count = maskLength ?? text.length - effectivePrefix - effectiveSuffix;
|
|
608
|
+
const suffixPart = effectiveSuffix > 0 ? text.slice(-effectiveSuffix) : "";
|
|
609
|
+
return text.slice(0, effectivePrefix) + mask.repeat(count) + suffixPart;
|
|
610
|
+
}
|
|
611
|
+
//#endregion
|
|
612
612
|
//#region src/string/camelize.ts
|
|
613
613
|
function camelize(s) {
|
|
614
614
|
s = s.replace(/[-_](\w)/g, (_, p) => p.toUpperCase());
|
|
@@ -1495,7 +1495,7 @@ __reExport(/* @__PURE__ */ __exportAll({
|
|
|
1495
1495
|
localStorage: () => localStorage,
|
|
1496
1496
|
lowerFirst: () => lowerFirst,
|
|
1497
1497
|
mapObject: () => mapObject,
|
|
1498
|
-
|
|
1498
|
+
maskString: () => maskString,
|
|
1499
1499
|
maxBy: () => maxBy,
|
|
1500
1500
|
mean: () => mean,
|
|
1501
1501
|
meanBy: () => meanBy,
|
|
@@ -1557,4 +1557,4 @@ __reExport(/* @__PURE__ */ __exportAll({
|
|
|
1557
1557
|
xorWith: () => xorWith
|
|
1558
1558
|
}), integrated_exports);
|
|
1559
1559
|
//#endregion
|
|
1560
|
-
export { NOOP, assert, at, baseRound, buildNavigationUrl, call, callOrReturn, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createCacheManager, createCookieStorage, createNamespaceFn, createStorage, debounce, delay, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, enumOf, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasDuplicates, hasDuplicatesBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject,
|
|
1560
|
+
export { NOOP, assert, at, baseRound, buildNavigationUrl, call, callOrReturn, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createCacheManager, createCookieStorage, createNamespaceFn, createStorage, debounce, delay, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, enumOf, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasDuplicates, hasDuplicatesBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject, maskString, maxBy, mean, meanBy, merge, mergeWith, minBy, mitt, motion, navigation, normalizeToArray, objectEntries, objectKeys, objectToString, omit, omitBy, once, pascalCase, pick, pickBy, prettyJSONObject, preventDefault, promiseWithResolvers, raf, randomColor, randomNumber, randomString, removeArrayBlank, removeArrayEmpty, removeItem, removeItemBy, removeItemsBy, requestAnimationFrame, round, sample, sessionStorage, set, shuffle, slash, sum, sumBy, sumHash, supportTouch, throttle, times, toArrayBuffer, toDataURL, toNumber, toRawType, toText, toTypeString, toggleItem, tryParseJSON, uniq, uniqBy, upperFirst, uuid, uuidV6, xor, xorWith };
|