toolbox-x 1.2.1 → 2.0.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/{Color-Dsut0Bex.d.cts → Color-B8MR8Vp0.d.cts} +1 -1
- package/dist/{Color-DCfoQk_-.d.mts → Color-D2MfZx7L.d.mts} +1 -1
- package/dist/{Stylog-DXZtHAbp.d.mts → Stylog-CSbLtqrZ.d.mts} +5 -5
- package/dist/{Stylog-TyLCTRtT.d.cts → Stylog-DF0CWtZb.d.cts} +5 -5
- package/dist/{area-CvSC96va.d.mts → area-C4tDXnGC.d.mts} +3 -3
- package/dist/{area-CcRQ6TfR.d.cts → area-CMJZ0gVm.d.cts} +3 -3
- package/dist/{array-B6jWzJ4F.d.mts → array-26Vs2HCs.d.mts} +1 -1
- package/dist/{array-CqDu610k.d.cts → array-DJAq9Qj8.d.cts} +1 -1
- package/dist/{basics-K8BDSYD6.cjs → basics-CJmdhXoo.cjs} +567 -14
- package/dist/{basics-1_M7UvCn.mjs → basics-CebgkY-n.mjs} +449 -16
- package/dist/{basics-KobRNhV-.d.cts → basics-Cis9Ej6c.d.mts} +5 -5
- package/dist/{basics-V5M2oltn.d.mts → basics-D4yU0NQ_.d.cts} +5 -5
- package/dist/{case-uKFzt5TY.cjs → case-Bd7QLHYw.cjs} +3 -3
- package/dist/{case-KdrBKjjK.d.mts → case-ChRzRBnY.d.mts} +12 -12
- package/dist/{case-BQwn5N-k.mjs → case-DBC4Rj0h.mjs} +3 -3
- package/dist/{case--Vjea9DS.d.cts → case-DkYSKSeV.d.cts} +12 -12
- package/dist/change-case.cjs +1 -1
- package/dist/change-case.d.cts +1 -1
- package/dist/change-case.d.mts +1 -1
- package/dist/change-case.mjs +1 -1
- package/dist/colors.d.cts +2 -2
- package/dist/colors.d.mts +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/converter.cjs +2 -2
- package/dist/converter.d.cts +2 -2
- package/dist/converter.d.mts +2 -2
- package/dist/converter.mjs +2 -2
- package/dist/date.cjs +10 -10
- package/dist/date.d.cts +4 -4
- package/dist/date.d.mts +4 -4
- package/dist/date.mjs +10 -10
- package/dist/dom.cjs +5 -6
- package/dist/dom.d.cts +3 -3
- package/dist/dom.d.mts +3 -3
- package/dist/dom.mjs +4 -5
- package/dist/{form-DoQGMTOc.d.mts → form-Cp1OyCRI.d.cts} +2 -2
- package/dist/{form-mP-nl8EC.d.cts → form-DPdS2AhM.d.mts} +2 -2
- package/dist/guards-B2s2wlVN.mjs +425 -0
- package/dist/{guards-C0smSAKC.mjs → guards-BK1QuvFZ.mjs} +2 -2
- package/dist/{guards-ClGDJrQp.cjs → guards-Bsh6Bfdq.cjs} +2 -2
- package/dist/{guards-0VjySrPM.cjs → guards-DMJcjPDt.cjs} +279 -3
- package/dist/guards.cjs +9 -8
- package/dist/guards.d.cts +6 -5
- package/dist/guards.d.mts +6 -5
- package/dist/guards.mjs +5 -5
- package/dist/{hash-BcoFHSu1.d.cts → hash-DfhOK0Fi.d.mts} +1 -1
- package/dist/{hash-GYRx2ee_.d.mts → hash-IdZN0mIe.d.cts} +1 -1
- package/dist/hash.cjs +8 -8
- package/dist/hash.d.cts +8 -8
- package/dist/hash.d.mts +8 -8
- package/dist/hash.mjs +4 -5
- package/dist/{http-status-xrlR-LlB.d.mts → http-status-B-yBZr-J.d.mts} +1 -1
- package/dist/{http-status-C0DOpCDf.d.cts → http-status-Dq_hoSG6.d.cts} +1 -1
- package/dist/http-status.cjs +4 -4
- package/dist/http-status.d.cts +6 -6
- package/dist/http-status.d.mts +6 -6
- package/dist/http-status.mjs +4 -4
- package/dist/index-C5FoCCbF.d.cts +292 -0
- package/dist/index-CIJWxnDS.d.mts +292 -0
- package/dist/index.cjs +67 -248
- package/dist/index.d.cts +25 -280
- package/dist/index.d.mts +25 -280
- package/dist/index.mjs +11 -194
- package/dist/{object-ChFVh95z.d.cts → object-X5fSMx-I.d.cts} +13 -1
- package/dist/{object-ChFVh95z.d.mts → object-X5fSMx-I.d.mts} +13 -1
- package/dist/{objectify-DEnFpPt1.mjs → objectify-CQa8gQib.mjs} +3 -4
- package/dist/{objectify-DewBSJP_.cjs → objectify-xQvZS3UI.cjs} +5 -6
- package/dist/paginator.d.cts +1 -1
- package/dist/paginator.d.mts +1 -1
- package/dist/{parse-DovagZFA.cjs → parse-DT7jbWx7.cjs} +3 -3
- package/dist/{parse-BhZ6-tKg.mjs → parse-erxBG2hd.mjs} +3 -3
- package/dist/{pluralizer-CdG-VJ6t.d.cts → pluralizer-B8vuljyy.d.cts} +1 -1
- package/dist/{pluralizer-D2Lh8CdU.d.mts → pluralizer-DOdDskzF.d.mts} +1 -1
- package/dist/pluralizer.cjs +6 -6
- package/dist/pluralizer.d.cts +6 -6
- package/dist/pluralizer.d.mts +6 -6
- package/dist/pluralizer.mjs +6 -6
- package/dist/{specials-Cye93-uo.mjs → specials-Hq5Ncd6y.mjs} +2 -2
- package/dist/{specials-BM6cx43o.cjs → specials-dkYP1Nh2.cjs} +2 -2
- package/dist/{string-CkwTVFeL.d.mts → string-C51m7T6d.d.mts} +4 -2
- package/dist/{string-Dq2b8rcN.d.cts → string-CO7HP50i.d.cts} +4 -2
- package/dist/stylog.cjs +5 -5
- package/dist/stylog.d.cts +2 -2
- package/dist/stylog.d.mts +2 -2
- package/dist/stylog.mjs +5 -5
- package/dist/types/array.d.cts +1 -1
- package/dist/types/array.d.mts +1 -1
- package/dist/types/colors.d.cts +1 -1
- package/dist/types/colors.d.mts +1 -1
- package/dist/types/converter.d.cts +1 -1
- package/dist/types/converter.d.mts +1 -1
- package/dist/types/date.d.cts +1 -1
- package/dist/types/date.d.mts +1 -1
- package/dist/types/form.d.cts +1 -1
- package/dist/types/form.d.mts +1 -1
- package/dist/types/hash.d.cts +1 -1
- package/dist/types/hash.d.mts +1 -1
- package/dist/types/http-status.d.cts +1 -1
- package/dist/types/http-status.d.mts +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/number.d.cts +1 -1
- package/dist/types/number.d.mts +1 -1
- package/dist/types/object.d.cts +2 -2
- package/dist/types/object.d.mts +2 -2
- package/dist/types/pluralizer.d.cts +1 -1
- package/dist/types/pluralizer.d.mts +1 -1
- package/dist/types/string.d.cts +2 -2
- package/dist/types/string.d.mts +2 -2
- package/dist/types/stylog.d.cts +1 -1
- package/dist/types/stylog.d.mts +1 -1
- package/dist/types/utils.d.cts +1 -1
- package/dist/types/utils.d.mts +1 -1
- package/dist/{utilities-CzyXCRHM.cjs → utilities-CWV1GPGY.cjs} +1 -1
- package/dist/{utilities-B9axOvOX.mjs → utilities-DPscNbS1.mjs} +1 -1
- package/dist/{uuid-DgTBxcVu.d.cts → uuid-BUI3Jt8n.d.cts} +3 -3
- package/dist/{uuid-Yc3Uu8qr.d.mts → uuid-mEiy14sf.d.mts} +3 -3
- package/dist/verbalizer.cjs +3 -3
- package/dist/verbalizer.d.cts +3 -3
- package/dist/verbalizer.d.mts +3 -3
- package/dist/verbalizer.mjs +3 -3
- package/package.json +7 -6
- package/dist/guards-DeO4ukiK.mjs +0 -221
- package/dist/utils-BxguWSoa.cjs +0 -568
- package/dist/utils-DXovsTKs.mjs +0 -449
|
@@ -7832,6 +7832,14 @@ type VoidFn = (...args: any[]) => void;
|
|
|
7832
7832
|
type DelayedFn<T extends VoidFn> = (...args: Parameters<T>) => void;
|
|
7833
7833
|
/** Asynchronous function type */
|
|
7834
7834
|
type AsyncFunction<T> = (...args: any[]) => Promise<T>;
|
|
7835
|
+
/** * A property descriptor that represents a method (a function-valued property). */
|
|
7836
|
+
interface MethodDescriptor<Fn extends GenericFn = GenericFn> extends Omit<PropertyDescriptor, 'value'> {
|
|
7837
|
+
value: Fn;
|
|
7838
|
+
}
|
|
7839
|
+
/** A function type that accepts a value and returns a boolean. */
|
|
7840
|
+
type ConditionFn<T = unknown> = (value: Maybe<T>) => boolean;
|
|
7841
|
+
/** An object type for storing multiple {@link ConditionFn condition} functions. */
|
|
7842
|
+
type ConditionFns<T extends GenericObject> = { [K in keyof T]?: ConditionFn<T[K]> };
|
|
7835
7843
|
/** Advanced types to exclude from counting as object key */
|
|
7836
7844
|
type AdvancedTypes = Array<unknown> | File | FileList | DateLike | Blob | Date | RegExp | WeakMap<WeakKey, unknown> | WeakSet<WeakKey> | Map<unknown, unknown> | Set<unknown> | Function | GenericFn | VoidFn | AsyncFunction<unknown> | Promise<unknown> | Error | EvalError | RangeError | ReferenceError | SyntaxError | TypeError | URIError | bigint | symbol;
|
|
7837
7845
|
/** Helper to detect if a type has methods */
|
|
@@ -8121,5 +8129,9 @@ type $Countries = (typeof COUNTRIES)[number];
|
|
|
8121
8129
|
type $Record<Key extends PropertyKey = string, T = any> = { [K in Key]: T } extends infer O ? { [K in keyof O]: O[K] } : { [K in Key]: T };
|
|
8122
8130
|
/** * Represents the details (read-only) of a country, including its name, country code, and ISO codes. */
|
|
8123
8131
|
type CountryDetails = Readonly<$Record<'country_name' | 'country_code' | 'iso_code_short' | 'iso_code', string>>;
|
|
8132
|
+
/**
|
|
8133
|
+
* Converts an object into a union of key-value tuples.
|
|
8134
|
+
*/
|
|
8135
|
+
type ObjectEntry<T extends GenericObject> = { [K in keyof T]: [K, T[K]] }[keyof T];
|
|
8124
8136
|
//#endregion
|
|
8125
|
-
export {
|
|
8137
|
+
export { GenericFn as $, PercentageOptions as $n, Replace as $r, Milliseconds as $t, OmitPath as A, ZodiacSign as An, IsStrictObject as Ar, ClockSecond as At, AsyncFunction as B, FrankFurter as Bn, PageListOptions as Br, DayPartConfig as Bt, LeafValue as C, DAYS as Ci, TimeZoneNameNative as Cn, DeepKeyof as Cr, $TimeUnitVarMap as Ct, NumericDotKey as D, COUNTRIES as Di, WeekDay as Dn, ExtractRequired as Dr, AcademicYear as Dt, NestedPrimitiveKey as E, WESTERN_ZODIAC_SIGNS as Ei, UTCOffset as En, ExtractOptional as Er, $UnitAnyCase as Et, SanitizeOptions as F, ConvertOptions as Fn, MapObjectValues as Fr, DateLike as Ft, ConditionFns as G, GetPercentOptions as Gn, Prettify as Gr, GreetingConfigs as Gt, Branded as H, GetChangeOptions as Hn, PaginatorOptions as Hr, FormatOptions as Ht, SanitizedData as I, ConvertedDecimal as In, Merge as Ir, DateString as It, Deserializer as J, LocaleCode as Jn, ProtoMethodOptions as Jr, ISODateFormat as Jt, Constructor as K, GetValueOptions as Kn, PropertyOptional as Kr, HourMinutes as Kt, StrictObject as L, CurrencyCode as Ln, Mutable as Lr, DateTimeFormatOptions as Lt, ParsedQueryGeneric as M, ApplyChangeOptions as Mn, Keyof as Mr, DateArgs as Mt, QueryObject as N, BanglaDigit as Nn, KeysOfUnion as Nr, DateFormatOptions as Nt, ObjectEntry as O, YearToken as On, FromMetaOptions as Or, ClockHour as Ot, QueryObjectValue as P, BnDigitResult as Pn, LooseLiteral as Pr, DateFormatToken as Pt, FlattenPartial as Q, Percent as Qn, Repeat as Qr, MSToken as Qt, AdvancedTypes as R, DecimalOptions as Rn, OmitByValue as Rr, DateToken as Rt, KeyForObject as S, TIME_ZONE_LABELS as Si, TimeZoneName as Sn, Cast as Sr, $TimeUnitVar as St, NestedKeyString as T, VEDIC_ZODIAC_SIGNS as Ti, UTCMinute as Tn, DeepPartialAll as Tr, $UTCOffset as Tt, ClassDetails as U, GetDifferenceOptions as Un, PickByValue as Ur, FormatToken as Ut, BasicPrimitive as V, FrankFurterCurrency as Vn, PaginatorMeta as Vr, DayToken as Vt, ConditionFn as W, GetOriginalOptions as Wn, Pop as Wr, FromNowUnit as Wt, Expect as X, NumberRange as Xn, RemoveNever as Xr, LocaleCalendar as Xt, Equal as Y, LooseRomanNumeral as Yn, RangeTuple as Yr, ISODateTimeString as Yt, FalsyPrimitive as Z, NumberType as Zn, RenameKeys as Zr, LocalesArguments as Zt, FlattenLeafKey as _, IANA_TZ_IDS as _i, TimeZone as _n, $Without as _r, $ISOTimeString as _t, ConvertObjectOptions as a, Split as ai, NegativeUTCHour as an, SIPrefix as ar, NormalPrimitive as at, GenericObjectPrimitive as b, TIME_ZONES_NATIVE as bi, TimeZoneIdNative as bn, ArrayToStringOptions as br, $TZLabelKey as bt, DeepKeys as c, TupleToUnion as ci, Quarter as cn, UnitNumberMethods as cr, Numeric as ct, DotNotationKeyStrict as d, Unit as di, TimeFormatToken as dn, $Expand as dr, Primitive as dt, ReplaceFirst as ei, MinuteToken as en, RandomNumberOptions as er, HasMethods as et, DotValue as f, CURRENCY_CODES as fi, TimeOnlyFormat as fn, $Forbid as fr, Serializer as ft, FlattenDotValue as g, UNITS as gi, TimeWithUnit as gn, $UnionToIntersection as gr, $GMTOffset as gt, FlattenDotKey as h, LOCALE_CODES as hi, TimeUnitValue as hn, $Subtract as hr, $DateUnit as ht, $Record as i, RequireOnly as ii, MonthToken as in, RomanNumeral as ir, NonNullishPrimitiveKey as it, ParsedQuery as j, $BnOnes as jn, Join as jr, ClockTime as jt, Objects as k, ZodiacPreset as kn, Immutable as kr, ClockMinute as kt, DeepKeysTuple as l, ValueOf as li, SafeFormat as ln, $BuildTuple as lr, OwnKeys as lt, ExtractStringKey as m, FRANKFURTER_CURRENCIES as mi, TimeUnit as mn, $Range as mr, VoidFn as mt, $DoesPathStartWith as n, RequireBetween as ni, MonthName as nn, RangedNumbers as nr, Maybe as nt, ConvertedObject as o, Tuple as oi, NumberingSystem as on, UnitKey as or, NormalPrimitiveKey as ot, ExpandAll as p, CURRENCY_LOCALES as pi, TimeToken as pn, $JoinRepeat as pr, ValidArray as pt, DelayedFn as q, InversePercentageOptions as qn, PropertyRequired as qr, HourToken as qt, $JoinDotKey as r, RequireExactly as ri, MonthString as rn, RomanCapital as rr, MethodDescriptor as rt, CountryDetails as s, TupleOf as si, PositiveUTCHour as sn, UnitLabel as sr, NullOrUndefined as st, $Countries as t, RequireAtLeast as ti, MonthDateString as tn, RangeOptions as tr, List as tt, DotNotationKey as u, ValueOptional as ui, SecondToken as un, $DeepPartial as ur, PartialOrRequired as ut, FlattenLeafValue as v, NATIVE_TZ_IDS as vi, TimeZoneDetails as vn, ArrayOfObjectsToStringOptions as vr, $LocalArguments as vt, MergeAll as w, MONTHS as wi, TimestampOptions as wn, DeepPartial as wr, $TimeZoneIdentifier as wt, KeyForArray as x, TIME_ZONE_IDS as xi, TimeZoneIdentifier as xn, ArrayToTuple as xr, $TimeUnitKey as xt, GenericObject as y, TIME_ZONES as yi, TimeZoneId as yn, ArrayOfPrimitivesToStringOptions as yr, $NativeTzNameOrId as yt, Any as z, Enumerate as zn, OneOf as zr, DayPart as zt };
|
|
@@ -7832,6 +7832,14 @@ type VoidFn = (...args: any[]) => void;
|
|
|
7832
7832
|
type DelayedFn<T extends VoidFn> = (...args: Parameters<T>) => void;
|
|
7833
7833
|
/** Asynchronous function type */
|
|
7834
7834
|
type AsyncFunction<T> = (...args: any[]) => Promise<T>;
|
|
7835
|
+
/** * A property descriptor that represents a method (a function-valued property). */
|
|
7836
|
+
interface MethodDescriptor<Fn extends GenericFn = GenericFn> extends Omit<PropertyDescriptor, 'value'> {
|
|
7837
|
+
value: Fn;
|
|
7838
|
+
}
|
|
7839
|
+
/** A function type that accepts a value and returns a boolean. */
|
|
7840
|
+
type ConditionFn<T = unknown> = (value: Maybe<T>) => boolean;
|
|
7841
|
+
/** An object type for storing multiple {@link ConditionFn condition} functions. */
|
|
7842
|
+
type ConditionFns<T extends GenericObject> = { [K in keyof T]?: ConditionFn<T[K]> };
|
|
7835
7843
|
/** Advanced types to exclude from counting as object key */
|
|
7836
7844
|
type AdvancedTypes = Array<unknown> | File | FileList | DateLike | Blob | Date | RegExp | WeakMap<WeakKey, unknown> | WeakSet<WeakKey> | Map<unknown, unknown> | Set<unknown> | Function | GenericFn | VoidFn | AsyncFunction<unknown> | Promise<unknown> | Error | EvalError | RangeError | ReferenceError | SyntaxError | TypeError | URIError | bigint | symbol;
|
|
7837
7845
|
/** Helper to detect if a type has methods */
|
|
@@ -8121,5 +8129,9 @@ type $Countries = (typeof COUNTRIES)[number];
|
|
|
8121
8129
|
type $Record<Key extends PropertyKey = string, T = any> = { [K in Key]: T } extends infer O ? { [K in keyof O]: O[K] } : { [K in Key]: T };
|
|
8122
8130
|
/** * Represents the details (read-only) of a country, including its name, country code, and ISO codes. */
|
|
8123
8131
|
type CountryDetails = Readonly<$Record<'country_name' | 'country_code' | 'iso_code_short' | 'iso_code', string>>;
|
|
8132
|
+
/**
|
|
8133
|
+
* Converts an object into a union of key-value tuples.
|
|
8134
|
+
*/
|
|
8135
|
+
type ObjectEntry<T extends GenericObject> = { [K in keyof T]: [K, T[K]] }[keyof T];
|
|
8124
8136
|
//#endregion
|
|
8125
|
-
export {
|
|
8137
|
+
export { GenericFn as $, PercentageOptions as $n, Replace as $r, Milliseconds as $t, OmitPath as A, ZodiacSign as An, IsStrictObject as Ar, ClockSecond as At, AsyncFunction as B, FrankFurter as Bn, PageListOptions as Br, DayPartConfig as Bt, LeafValue as C, DAYS as Ci, TimeZoneNameNative as Cn, DeepKeyof as Cr, $TimeUnitVarMap as Ct, NumericDotKey as D, COUNTRIES as Di, WeekDay as Dn, ExtractRequired as Dr, AcademicYear as Dt, NestedPrimitiveKey as E, WESTERN_ZODIAC_SIGNS as Ei, UTCOffset as En, ExtractOptional as Er, $UnitAnyCase as Et, SanitizeOptions as F, ConvertOptions as Fn, MapObjectValues as Fr, DateLike as Ft, ConditionFns as G, GetPercentOptions as Gn, Prettify as Gr, GreetingConfigs as Gt, Branded as H, GetChangeOptions as Hn, PaginatorOptions as Hr, FormatOptions as Ht, SanitizedData as I, ConvertedDecimal as In, Merge as Ir, DateString as It, Deserializer as J, LocaleCode as Jn, ProtoMethodOptions as Jr, ISODateFormat as Jt, Constructor as K, GetValueOptions as Kn, PropertyOptional as Kr, HourMinutes as Kt, StrictObject as L, CurrencyCode as Ln, Mutable as Lr, DateTimeFormatOptions as Lt, ParsedQueryGeneric as M, ApplyChangeOptions as Mn, Keyof as Mr, DateArgs as Mt, QueryObject as N, BanglaDigit as Nn, KeysOfUnion as Nr, DateFormatOptions as Nt, ObjectEntry as O, YearToken as On, FromMetaOptions as Or, ClockHour as Ot, QueryObjectValue as P, BnDigitResult as Pn, LooseLiteral as Pr, DateFormatToken as Pt, FlattenPartial as Q, Percent as Qn, Repeat as Qr, MSToken as Qt, AdvancedTypes as R, DecimalOptions as Rn, OmitByValue as Rr, DateToken as Rt, KeyForObject as S, TIME_ZONE_LABELS as Si, TimeZoneName as Sn, Cast as Sr, $TimeUnitVar as St, NestedKeyString as T, VEDIC_ZODIAC_SIGNS as Ti, UTCMinute as Tn, DeepPartialAll as Tr, $UTCOffset as Tt, ClassDetails as U, GetDifferenceOptions as Un, PickByValue as Ur, FormatToken as Ut, BasicPrimitive as V, FrankFurterCurrency as Vn, PaginatorMeta as Vr, DayToken as Vt, ConditionFn as W, GetOriginalOptions as Wn, Pop as Wr, FromNowUnit as Wt, Expect as X, NumberRange as Xn, RemoveNever as Xr, LocaleCalendar as Xt, Equal as Y, LooseRomanNumeral as Yn, RangeTuple as Yr, ISODateTimeString as Yt, FalsyPrimitive as Z, NumberType as Zn, RenameKeys as Zr, LocalesArguments as Zt, FlattenLeafKey as _, IANA_TZ_IDS as _i, TimeZone as _n, $Without as _r, $ISOTimeString as _t, ConvertObjectOptions as a, Split as ai, NegativeUTCHour as an, SIPrefix as ar, NormalPrimitive as at, GenericObjectPrimitive as b, TIME_ZONES_NATIVE as bi, TimeZoneIdNative as bn, ArrayToStringOptions as br, $TZLabelKey as bt, DeepKeys as c, TupleToUnion as ci, Quarter as cn, UnitNumberMethods as cr, Numeric as ct, DotNotationKeyStrict as d, Unit as di, TimeFormatToken as dn, $Expand as dr, Primitive as dt, ReplaceFirst as ei, MinuteToken as en, RandomNumberOptions as er, HasMethods as et, DotValue as f, CURRENCY_CODES as fi, TimeOnlyFormat as fn, $Forbid as fr, Serializer as ft, FlattenDotValue as g, UNITS as gi, TimeWithUnit as gn, $UnionToIntersection as gr, $GMTOffset as gt, FlattenDotKey as h, LOCALE_CODES as hi, TimeUnitValue as hn, $Subtract as hr, $DateUnit as ht, $Record as i, RequireOnly as ii, MonthToken as in, RomanNumeral as ir, NonNullishPrimitiveKey as it, ParsedQuery as j, $BnOnes as jn, Join as jr, ClockTime as jt, Objects as k, ZodiacPreset as kn, Immutable as kr, ClockMinute as kt, DeepKeysTuple as l, ValueOf as li, SafeFormat as ln, $BuildTuple as lr, OwnKeys as lt, ExtractStringKey as m, FRANKFURTER_CURRENCIES as mi, TimeUnit as mn, $Range as mr, VoidFn as mt, $DoesPathStartWith as n, RequireBetween as ni, MonthName as nn, RangedNumbers as nr, Maybe as nt, ConvertedObject as o, Tuple as oi, NumberingSystem as on, UnitKey as or, NormalPrimitiveKey as ot, ExpandAll as p, CURRENCY_LOCALES as pi, TimeToken as pn, $JoinRepeat as pr, ValidArray as pt, DelayedFn as q, InversePercentageOptions as qn, PropertyRequired as qr, HourToken as qt, $JoinDotKey as r, RequireExactly as ri, MonthString as rn, RomanCapital as rr, MethodDescriptor as rt, CountryDetails as s, TupleOf as si, PositiveUTCHour as sn, UnitLabel as sr, NullOrUndefined as st, $Countries as t, RequireAtLeast as ti, MonthDateString as tn, RangeOptions as tr, List as tt, DotNotationKey as u, ValueOptional as ui, SecondToken as un, $DeepPartial as ur, PartialOrRequired as ut, FlattenLeafValue as v, NATIVE_TZ_IDS as vi, TimeZoneDetails as vn, ArrayOfObjectsToStringOptions as vr, $LocalArguments as vt, MergeAll as w, MONTHS as wi, TimestampOptions as wn, DeepPartial as wr, $TimeZoneIdentifier as wt, KeyForArray as x, TIME_ZONE_IDS as xi, TimeZoneIdentifier as xn, ArrayToTuple as xr, $TimeUnitKey as xt, GenericObject as y, TIME_ZONES as yi, TimeZoneId as yn, ArrayOfPrimitivesToStringOptions as yr, $NativeTzNameOrId as yt, Any as z, Enumerate as zn, OneOf as zr, DayPart as zt };
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { d as isString } from "./primitives-Djsevc69.mjs";
|
|
18
|
-
import { E as isObjectWithKeys, T as isObject, g as isArrayOfType, j as isValidArray, v as isEmptyObject, w as isNotEmptyObject } from "./specials-
|
|
19
|
-
import { t as isDateLike } from "./guards-
|
|
20
|
-
import { n as trimString } from "./basics-
|
|
21
|
-
import { f as isDeepEqual } from "./utils-DXovsTKs.mjs";
|
|
18
|
+
import { E as isObjectWithKeys, T as isObject, g as isArrayOfType, j as isValidArray, v as isEmptyObject, w as isNotEmptyObject } from "./specials-Hq5Ncd6y.mjs";
|
|
19
|
+
import { t as isDateLike } from "./guards-BK1QuvFZ.mjs";
|
|
20
|
+
import { U as isDeepEqual, n as trimString } from "./basics-CebgkY-n.mjs";
|
|
22
21
|
|
|
23
22
|
//#region src/form/guards.ts
|
|
24
23
|
/**
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
18
|
-
const require_specials = require('./specials-
|
|
19
|
-
const require_guards = require('./guards-
|
|
20
|
-
const require_basics = require('./basics-
|
|
21
|
-
const require_utils = require('./utils-BxguWSoa.cjs');
|
|
18
|
+
const require_specials = require('./specials-dkYP1Nh2.cjs');
|
|
19
|
+
const require_guards = require('./guards-Bsh6Bfdq.cjs');
|
|
20
|
+
const require_basics = require('./basics-CJmdhXoo.cjs');
|
|
22
21
|
|
|
23
22
|
//#region src/form/guards.ts
|
|
24
23
|
/**
|
|
@@ -339,7 +338,7 @@ const flattenObjectDotNotation = (object) => {
|
|
|
339
338
|
*/
|
|
340
339
|
const extractUpdatedFields = (baseObject, updatedObject) => {
|
|
341
340
|
const updatedFields = {};
|
|
342
|
-
for (const key in updatedObject) if (key in baseObject && !
|
|
341
|
+
for (const key in updatedObject) if (key in baseObject && !require_basics.isDeepEqual(updatedObject[key], baseObject[key])) if (updatedObject[key] && require_specials.isNotEmptyObject(updatedObject[key])) {
|
|
343
342
|
updatedFields[key] = extractUpdatedFields(baseObject[key], updatedObject[key]);
|
|
344
343
|
if (updatedFields[key] && require_specials.isEmptyObject(updatedFields[key])) delete updatedFields[key];
|
|
345
344
|
} else updatedFields[key] = updatedObject[key];
|
|
@@ -372,7 +371,7 @@ const extractUpdatedAndNewFields = (baseObject, updatedObject) => {
|
|
|
372
371
|
const updatedFields = {};
|
|
373
372
|
const newFields = {};
|
|
374
373
|
for (const key in updatedObject) if (!(key in baseObject)) newFields[key] = updatedObject[key];
|
|
375
|
-
else if (!
|
|
374
|
+
else if (!require_basics.isDeepEqual(updatedObject[key], baseObject[key])) if (updatedObject[key] && require_specials.isNotEmptyObject(updatedObject[key])) {
|
|
376
375
|
updatedFields[key] = extractUpdatedAndNewFields(baseObject[key], updatedObject[key]);
|
|
377
376
|
if (updatedFields[key] && require_specials.isEmptyObject(updatedFields[key])) delete updatedFields[key];
|
|
378
377
|
} else updatedFields[key] = updatedObject[key];
|
package/dist/paginator.d.cts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { Br as PageListOptions, Hr as PaginatorOptions, Or as FromMetaOptions, Vr as PaginatorMeta } from "./object-X5fSMx-I.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/utils/Paginator.d.ts
|
|
20
20
|
/** @class Generates pagination logic, offsets, metadata and other pagination logic(s) for APIs and UIs. */
|
package/dist/paginator.d.mts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { Br as PageListOptions, Hr as PaginatorOptions, Or as FromMetaOptions, Vr as PaginatorMeta } from "./object-X5fSMx-I.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/utils/Paginator.d.ts
|
|
20
20
|
/** @class Generates pagination logic, offsets, metadata and other pagination logic(s) for APIs and UIs. */
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
18
18
|
const require_constants = require('./constants-C4RW7Lei.cjs');
|
|
19
|
-
const require_specials = require('./specials-
|
|
20
|
-
const require_utilities = require('./utilities-
|
|
21
|
-
const require_guards = require('./guards-
|
|
19
|
+
const require_specials = require('./specials-dkYP1Nh2.cjs');
|
|
20
|
+
const require_utilities = require('./utilities-CWV1GPGY.cjs');
|
|
21
|
+
const require_guards = require('./guards-Bsh6Bfdq.cjs');
|
|
22
22
|
|
|
23
23
|
//#region src/date/helpers.ts
|
|
24
24
|
/** Core formatting logic shared by `formatDate` and `Chronos`, `BanglaCalendar` classes */
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
import { a as isNonEmptyString, c as isNumber, d as isString } from "./primitives-Djsevc69.mjs";
|
|
18
18
|
import { i as SORTED_TIME_FORMATS, n as MONTHS, r as MS_MAP, t as DAYS } from "./constants-rNhoy4DH.mjs";
|
|
19
|
-
import { d as isNumericString } from "./specials-
|
|
20
|
-
import { r as getOrdinal } from "./utilities-
|
|
21
|
-
import { i as isTimeWithUnit } from "./guards-
|
|
19
|
+
import { d as isNumericString } from "./specials-Hq5Ncd6y.mjs";
|
|
20
|
+
import { r as getOrdinal } from "./utilities-DPscNbS1.mjs";
|
|
21
|
+
import { i as isTimeWithUnit } from "./guards-BK1QuvFZ.mjs";
|
|
22
22
|
|
|
23
23
|
//#region src/date/helpers.ts
|
|
24
24
|
/** Core formatting logic shared by `formatDate` and `Chronos`, `BanglaCalendar` classes */
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { ct as Numeric } from "./object-X5fSMx-I.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/types/pluralizer.d.ts
|
|
20
20
|
/** A pair of RegExp and replacement for pluralization rules */
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { ct as Numeric } from "./object-X5fSMx-I.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/types/pluralizer.d.ts
|
|
20
20
|
/** A pair of RegExp and replacement for pluralization rules */
|
package/dist/pluralizer.cjs
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
18
18
|
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
19
|
-
const require_utilities = require('./utilities-
|
|
19
|
+
const require_utilities = require('./utilities-CWV1GPGY.cjs');
|
|
20
20
|
|
|
21
21
|
//#region src/pluralizer/rules.ts
|
|
22
22
|
/** Irregular singular → plural mappings */
|
|
@@ -453,9 +453,9 @@ const uncountables = /* @__PURE__ */ Object.freeze(new Set([
|
|
|
453
453
|
* - This class is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
454
454
|
*
|
|
455
455
|
* @remarks
|
|
456
|
-
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
456
|
+
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/string/format-unit-with-plural formatUnitWithPlural} instead.
|
|
457
457
|
*
|
|
458
|
-
* - For ready to use instance, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
458
|
+
* - For ready to use instance, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/string/pluralizer pluralizer} instead.
|
|
459
459
|
*
|
|
460
460
|
* @example
|
|
461
461
|
* const pluralizer = new Pluralizer();
|
|
@@ -649,12 +649,12 @@ var Pluralizer = class {
|
|
|
649
649
|
}
|
|
650
650
|
};
|
|
651
651
|
/**
|
|
652
|
-
* Default shared instance of {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/
|
|
652
|
+
* Default shared instance of {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/pluralizer Pluralizer}.
|
|
653
653
|
*
|
|
654
654
|
* - _Use this when you don’t need multiple configurations._
|
|
655
655
|
* - _It comes preloaded with standard pluralization rules, irregular forms, and uncountable nouns._
|
|
656
656
|
*
|
|
657
|
-
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/
|
|
657
|
+
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/format-unit-with-plural formatUnitWithPlural} instead.
|
|
658
658
|
*
|
|
659
659
|
* * Handles English word pluralization and singularization with support for irregular forms and uncountable nouns.
|
|
660
660
|
*
|
|
@@ -665,7 +665,7 @@ var Pluralizer = class {
|
|
|
665
665
|
* - Supports options for count-based pluralization, allowing for inclusive formatting.
|
|
666
666
|
* - This is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
667
667
|
* @example
|
|
668
|
-
* import { pluralizer } from '
|
|
668
|
+
* import { pluralizer } from 'toolbox-x/pluralizer';
|
|
669
669
|
*
|
|
670
670
|
* pluralizer.pluralize('child'); // "children"
|
|
671
671
|
* pluralizer.toSingular('geese'); // "goose"
|
package/dist/pluralizer.d.cts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { n as PluralizeOptions } from "./pluralizer-
|
|
17
|
+
import { n as PluralizeOptions } from "./pluralizer-B8vuljyy.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/pluralizer/Pluralizer.d.ts
|
|
20
20
|
/**
|
|
@@ -28,9 +28,9 @@ import { n as PluralizeOptions } from "./pluralizer-CdG-VJ6t.cjs";
|
|
|
28
28
|
* - This class is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
31
|
+
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/string/format-unit-with-plural formatUnitWithPlural} instead.
|
|
32
32
|
*
|
|
33
|
-
* - For ready to use instance, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
33
|
+
* - For ready to use instance, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/string/pluralizer pluralizer} instead.
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
36
|
* const pluralizer = new Pluralizer();
|
|
@@ -125,12 +125,12 @@ declare class Pluralizer {
|
|
|
125
125
|
isSingular(word: string): boolean;
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
|
-
* Default shared instance of {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/
|
|
128
|
+
* Default shared instance of {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/pluralizer Pluralizer}.
|
|
129
129
|
*
|
|
130
130
|
* - _Use this when you don’t need multiple configurations._
|
|
131
131
|
* - _It comes preloaded with standard pluralization rules, irregular forms, and uncountable nouns._
|
|
132
132
|
*
|
|
133
|
-
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/
|
|
133
|
+
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/format-unit-with-plural formatUnitWithPlural} instead.
|
|
134
134
|
*
|
|
135
135
|
* * Handles English word pluralization and singularization with support for irregular forms and uncountable nouns.
|
|
136
136
|
*
|
|
@@ -141,7 +141,7 @@ declare class Pluralizer {
|
|
|
141
141
|
* - Supports options for count-based pluralization, allowing for inclusive formatting.
|
|
142
142
|
* - This is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
143
143
|
* @example
|
|
144
|
-
* import { pluralizer } from '
|
|
144
|
+
* import { pluralizer } from 'toolbox-x/pluralizer';
|
|
145
145
|
*
|
|
146
146
|
* pluralizer.pluralize('child'); // "children"
|
|
147
147
|
* pluralizer.toSingular('geese'); // "goose"
|
package/dist/pluralizer.d.mts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { n as PluralizeOptions } from "./pluralizer-
|
|
17
|
+
import { n as PluralizeOptions } from "./pluralizer-DOdDskzF.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/pluralizer/Pluralizer.d.ts
|
|
20
20
|
/**
|
|
@@ -28,9 +28,9 @@ import { n as PluralizeOptions } from "./pluralizer-D2Lh8CdU.mjs";
|
|
|
28
28
|
* - This class is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
31
|
+
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/string/format-unit-with-plural formatUnitWithPlural} instead.
|
|
32
32
|
*
|
|
33
|
-
* - For ready to use instance, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
33
|
+
* - For ready to use instance, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/string/pluralizer pluralizer} instead.
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
36
|
* const pluralizer = new Pluralizer();
|
|
@@ -125,12 +125,12 @@ declare class Pluralizer {
|
|
|
125
125
|
isSingular(word: string): boolean;
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
|
-
* Default shared instance of {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/
|
|
128
|
+
* Default shared instance of {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/pluralizer Pluralizer}.
|
|
129
129
|
*
|
|
130
130
|
* - _Use this when you don’t need multiple configurations._
|
|
131
131
|
* - _It comes preloaded with standard pluralization rules, irregular forms, and uncountable nouns._
|
|
132
132
|
*
|
|
133
|
-
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/
|
|
133
|
+
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/format-unit-with-plural formatUnitWithPlural} instead.
|
|
134
134
|
*
|
|
135
135
|
* * Handles English word pluralization and singularization with support for irregular forms and uncountable nouns.
|
|
136
136
|
*
|
|
@@ -141,7 +141,7 @@ declare class Pluralizer {
|
|
|
141
141
|
* - Supports options for count-based pluralization, allowing for inclusive formatting.
|
|
142
142
|
* - This is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
143
143
|
* @example
|
|
144
|
-
* import { pluralizer } from '
|
|
144
|
+
* import { pluralizer } from 'toolbox-x/pluralizer';
|
|
145
145
|
*
|
|
146
146
|
* pluralizer.pluralize('child'); // "children"
|
|
147
147
|
* pluralizer.toSingular('geese'); // "goose"
|
package/dist/pluralizer.mjs
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { a as isNonEmptyString, d as isString, m as isUndefined } from "./primitives-Djsevc69.mjs";
|
|
18
|
-
import { a as normalizeNumber } from "./utilities-
|
|
18
|
+
import { a as normalizeNumber } from "./utilities-DPscNbS1.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/pluralizer/rules.ts
|
|
21
21
|
/** Irregular singular → plural mappings */
|
|
@@ -452,9 +452,9 @@ const uncountables = /* @__PURE__ */ Object.freeze(new Set([
|
|
|
452
452
|
* - This class is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
453
453
|
*
|
|
454
454
|
* @remarks
|
|
455
|
-
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
455
|
+
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/string/format-unit-with-plural formatUnitWithPlural} instead.
|
|
456
456
|
*
|
|
457
|
-
* - For ready to use instance, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
457
|
+
* - For ready to use instance, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/string/pluralizer pluralizer} instead.
|
|
458
458
|
*
|
|
459
459
|
* @example
|
|
460
460
|
* const pluralizer = new Pluralizer();
|
|
@@ -648,12 +648,12 @@ var Pluralizer = class {
|
|
|
648
648
|
}
|
|
649
649
|
};
|
|
650
650
|
/**
|
|
651
|
-
* Default shared instance of {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/
|
|
651
|
+
* Default shared instance of {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/pluralizer Pluralizer}.
|
|
652
652
|
*
|
|
653
653
|
* - _Use this when you don’t need multiple configurations._
|
|
654
654
|
* - _It comes preloaded with standard pluralization rules, irregular forms, and uncountable nouns._
|
|
655
655
|
*
|
|
656
|
-
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/
|
|
656
|
+
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/format-unit-with-plural formatUnitWithPlural} instead.
|
|
657
657
|
*
|
|
658
658
|
* * Handles English word pluralization and singularization with support for irregular forms and uncountable nouns.
|
|
659
659
|
*
|
|
@@ -664,7 +664,7 @@ var Pluralizer = class {
|
|
|
664
664
|
* - Supports options for count-based pluralization, allowing for inclusive formatting.
|
|
665
665
|
* - This is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
666
666
|
* @example
|
|
667
|
-
* import { pluralizer } from '
|
|
667
|
+
* import { pluralizer } from 'toolbox-x/pluralizer';
|
|
668
668
|
*
|
|
669
669
|
* pluralizer.pluralize('child'); // "children"
|
|
670
670
|
* pluralizer.toSingular('geese'); // "goose"
|
|
@@ -81,7 +81,7 @@ function isFunction(value) {
|
|
|
81
81
|
* @returns `true` if the descriptor is defined and its value is a function; otherwise, `false`.
|
|
82
82
|
*/
|
|
83
83
|
const isMethodDescriptor = (descriptor) => {
|
|
84
|
-
return !!descriptor &&
|
|
84
|
+
return !!descriptor && isFunction(descriptor?.value);
|
|
85
85
|
};
|
|
86
86
|
/**
|
|
87
87
|
* * Type guard to check if a value is a Date object.
|
|
@@ -269,7 +269,7 @@ function isIPAddress(value) {
|
|
|
269
269
|
/**
|
|
270
270
|
* * Type guard to check if the current environment matches a given string.
|
|
271
271
|
* @param env - The expected environment (e.g., "production", "development").
|
|
272
|
-
* @returns `true` if the value
|
|
272
|
+
* @returns `true` if the value equals to `process.env.NODE_ENV`, otherwise `false`.
|
|
273
273
|
*/
|
|
274
274
|
function isEnvironment(env) {
|
|
275
275
|
return process.env.NODE_ENV === env;
|
|
@@ -81,7 +81,7 @@ function isFunction(value) {
|
|
|
81
81
|
* @returns `true` if the descriptor is defined and its value is a function; otherwise, `false`.
|
|
82
82
|
*/
|
|
83
83
|
const isMethodDescriptor = (descriptor) => {
|
|
84
|
-
return !!descriptor &&
|
|
84
|
+
return !!descriptor && isFunction(descriptor?.value);
|
|
85
85
|
};
|
|
86
86
|
/**
|
|
87
87
|
* * Type guard to check if a value is a Date object.
|
|
@@ -269,7 +269,7 @@ function isIPAddress(value) {
|
|
|
269
269
|
/**
|
|
270
270
|
* * Type guard to check if the current environment matches a given string.
|
|
271
271
|
* @param env - The expected environment (e.g., "production", "development").
|
|
272
|
-
* @returns `true` if the value
|
|
272
|
+
* @returns `true` if the value equals to `process.env.NODE_ENV`, otherwise `false`.
|
|
273
273
|
*/
|
|
274
274
|
function isEnvironment(env) {
|
|
275
275
|
return process.env.NODE_ENV === env;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { t as LOWERCASE } from "./constants-C7wERz5m.mjs";
|
|
18
|
-
import {
|
|
18
|
+
import { Pr as LooseLiteral, ai as Split, jr as Join, t as $Countries } from "./object-X5fSMx-I.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/types/string.d.ts
|
|
21
21
|
declare global {
|
|
@@ -211,6 +211,8 @@ type TitleCase<Str extends string, Del extends string = ''> = Split<$NormalizeSt
|
|
|
211
211
|
* @remarks It will lowercase: auxiliaries, prepositions, articles and conjunctions unless they are at the beginning.
|
|
212
212
|
*/
|
|
213
213
|
type SentenceCase<Str extends string, Del extends string = ''> = Split<$NormalizeString<Str, Del>, ' '> extends [infer F extends string, ...infer R extends string[]] ? `${Capitalize<Lowercase<F>>} ${Join<$LowercaseWords<R>, ' '>}` : ' ';
|
|
214
|
+
/** Helper type to convert an empty string to `string` while maintaining the literal type otherwise. */
|
|
215
|
+
type $WidenEmpty<T extends string> = T extends '' ? string : T;
|
|
214
216
|
/** Matches any non-Latin character. */
|
|
215
217
|
type SpecialCharacter = Lowercase<string> & Uppercase<string>;
|
|
216
218
|
/** Evaluates whether a string consists only of Latin alphabet characters. */
|
|
@@ -259,4 +261,4 @@ interface CharDiffResult {
|
|
|
259
261
|
modified: HighlightedText[];
|
|
260
262
|
}
|
|
261
263
|
//#endregion
|
|
262
|
-
export {
|
|
264
|
+
export { KebabCase as A, StringCaseOptions as B, DiffLine as C, HighlightedText as D, DotCase as E, QueryString as F, TrainCase as H, RandomIdOptions as I, SentenceCase as L, PascalCase as M, PascalSnakeCase as N, Includes as O, PathCase as P, SnakeCase as R, CountryShortISO as S, DiffResult as T, Trim as U, TitleCase as V, ConstantCase as _, $NormalizeString as a, CountryISO as b, $TrimRight as c, Alphabet as d, AnagramOptions as f, CharDiffResult as g, CaseFormat as h, $LowercaseWords as i, MaskOptions as j, IsAlphabet as k, $UppercaseWords as l, CapitalizeOptions as m, $EnsureString as n, $TitleCaseWords as o, CamelCase as p, $LowerCaseWord as r, $TrimLeft as s, $CapitalizeWords as t, $WidenEmpty as u, Country as v, DiffLineType as w, CountryName as x, CountryCode as y, SpecialCharacter as z };
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { t as LOWERCASE } from "./constants-C7wERz5m.cjs";
|
|
18
|
-
import {
|
|
18
|
+
import { Pr as LooseLiteral, ai as Split, jr as Join, t as $Countries } from "./object-X5fSMx-I.cjs";
|
|
19
19
|
|
|
20
20
|
//#region src/types/string.d.ts
|
|
21
21
|
declare global {
|
|
@@ -211,6 +211,8 @@ type TitleCase<Str extends string, Del extends string = ''> = Split<$NormalizeSt
|
|
|
211
211
|
* @remarks It will lowercase: auxiliaries, prepositions, articles and conjunctions unless they are at the beginning.
|
|
212
212
|
*/
|
|
213
213
|
type SentenceCase<Str extends string, Del extends string = ''> = Split<$NormalizeString<Str, Del>, ' '> extends [infer F extends string, ...infer R extends string[]] ? `${Capitalize<Lowercase<F>>} ${Join<$LowercaseWords<R>, ' '>}` : ' ';
|
|
214
|
+
/** Helper type to convert an empty string to `string` while maintaining the literal type otherwise. */
|
|
215
|
+
type $WidenEmpty<T extends string> = T extends '' ? string : T;
|
|
214
216
|
/** Matches any non-Latin character. */
|
|
215
217
|
type SpecialCharacter = Lowercase<string> & Uppercase<string>;
|
|
216
218
|
/** Evaluates whether a string consists only of Latin alphabet characters. */
|
|
@@ -259,4 +261,4 @@ interface CharDiffResult {
|
|
|
259
261
|
modified: HighlightedText[];
|
|
260
262
|
}
|
|
261
263
|
//#endregion
|
|
262
|
-
export {
|
|
264
|
+
export { KebabCase as A, StringCaseOptions as B, DiffLine as C, HighlightedText as D, DotCase as E, QueryString as F, TrainCase as H, RandomIdOptions as I, SentenceCase as L, PascalCase as M, PascalSnakeCase as N, Includes as O, PathCase as P, SnakeCase as R, CountryShortISO as S, DiffResult as T, Trim as U, TitleCase as V, ConstantCase as _, $NormalizeString as a, CountryISO as b, $TrimRight as c, Alphabet as d, AnagramOptions as f, CharDiffResult as g, CaseFormat as h, $LowercaseWords as i, MaskOptions as j, IsAlphabet as k, $UppercaseWords as l, CapitalizeOptions as m, $EnsureString as n, $TitleCaseWords as o, CamelCase as p, $LowerCaseWord as r, $TrimLeft as s, $CapitalizeWords as t, $WidenEmpty as u, Country as v, DiffLineType as w, CountryName as x, CountryCode as y, SpecialCharacter as z };
|
package/dist/stylog.cjs
CHANGED
|
@@ -19,7 +19,7 @@ const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
|
19
19
|
const require_css_colors = require('./css-colors-DC7oZ46Y.cjs');
|
|
20
20
|
const require_guards = require('./guards-DGN95D2h.cjs');
|
|
21
21
|
const require_convert = require('./convert-Cqy2Llek.cjs');
|
|
22
|
-
const require_specials = require('./specials-
|
|
22
|
+
const require_specials = require('./specials-dkYP1Nh2.cjs');
|
|
23
23
|
|
|
24
24
|
//#region src/stylog/console.log.ts
|
|
25
25
|
/**
|
|
@@ -210,7 +210,7 @@ function isTextStyle(value) {
|
|
|
210
210
|
*
|
|
211
211
|
* @remarks
|
|
212
212
|
* - Allows chaining of style methods or initializing with predefined styles.
|
|
213
|
-
* - For fluent, chainable styling with zero configuration use {@link https://toolbox-x.nazmul-nhb.dev/docs/
|
|
213
|
+
* - For fluent, chainable styling with zero configuration use {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/misc/stylog Stylog} (`LogStyler` chainable wrapper).
|
|
214
214
|
*
|
|
215
215
|
* @example
|
|
216
216
|
* const styled = new LogStyler(['red', 'bold']);
|
|
@@ -316,7 +316,7 @@ var LogStyler = class LogStyler {
|
|
|
316
316
|
* @remarks
|
|
317
317
|
* - This method is specifically designed for browser environments and returns a tuple containing the formatted string with `%c` placeholder and an array of CSS styles (`string[]`).
|
|
318
318
|
* - Use this when you need direct access to the CSS styling for custom browser output.
|
|
319
|
-
* - If you want to format with ANSI escape codes, consider using {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/
|
|
319
|
+
* - If you want to format with ANSI escape codes, consider using {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/log-styler#toansiinput-stringify toANSI} method.
|
|
320
320
|
*
|
|
321
321
|
* @param input - Input to style before printing in the shell.
|
|
322
322
|
* @param stringify - Whether to apply `JSON.stringify()` before styling. Defaults to `false`.
|
|
@@ -375,7 +375,7 @@ var LogStyler = class LogStyler {
|
|
|
375
375
|
*
|
|
376
376
|
* @remarks
|
|
377
377
|
* - This method returns ANSI-formatted strings suitable for environments that support ANSI escape codes (terminals, modern browser consoles, etc.).
|
|
378
|
-
* - For unsupported browsers, consider using the {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/
|
|
378
|
+
* - For unsupported browsers, consider using the {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/log-styler#loginput-stringify log} method to print directly or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/log-styler#tocssinput-stringify toCSS} to get styled tuple `[format, cssList]` for Browser.
|
|
379
379
|
*
|
|
380
380
|
* @param input - Input to style before printing in the shell.
|
|
381
381
|
* @param stringify - Whether to apply `JSON.stringify()` before styling. Defaults to `false`.
|
|
@@ -588,7 +588,7 @@ function createStylogProxy(styler) {
|
|
|
588
588
|
* - In browsers, styles are applied using `CSS`; in `Node.js`, `ANSI` escape codes are used.
|
|
589
589
|
* - When multiple styles of the same category are chained, the last one wins.
|
|
590
590
|
* - Use `.log(value, stringify?)` to print; set `stringify` to `true` to serialize with `JSON.stringify`.
|
|
591
|
-
* - If you need custom reusable style configurations, use {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/
|
|
591
|
+
* - If you need custom reusable style configurations, use {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/log-styler Stylog} class.
|
|
592
592
|
*
|
|
593
593
|
* @example
|
|
594
594
|
* // Simple color
|
package/dist/stylog.d.cts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { _ as Hex } from "./Color-
|
|
18
|
-
import { a as AnsiSequence, n as Stylog, o as BGColor, t as LogStyler, u as TextStyle } from "./Stylog-
|
|
17
|
+
import { _ as Hex } from "./Color-B8MR8Vp0.cjs";
|
|
18
|
+
import { a as AnsiSequence, n as Stylog, o as BGColor, t as LogStyler, u as TextStyle } from "./Stylog-DF0CWtZb.cjs";
|
|
19
19
|
|
|
20
20
|
//#region src/stylog/utils.d.ts
|
|
21
21
|
/**
|
package/dist/stylog.d.mts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { _ as Hex } from "./Color-
|
|
18
|
-
import { a as AnsiSequence, n as Stylog, o as BGColor, t as LogStyler, u as TextStyle } from "./Stylog-
|
|
17
|
+
import { _ as Hex } from "./Color-D2MfZx7L.mjs";
|
|
18
|
+
import { a as AnsiSequence, n as Stylog, o as BGColor, t as LogStyler, u as TextStyle } from "./Stylog-CSbLtqrZ.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/stylog/utils.d.ts
|
|
21
21
|
/**
|