all-you-need 0.1.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.
@@ -0,0 +1,336 @@
1
+ 'use strict';
2
+
3
+ var chunkSEJ5J4LY_cjs = require('../chunk-SEJ5J4LY.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "addDays", {
8
+ enumerable: true,
9
+ get: function () { return chunkSEJ5J4LY_cjs.addDays; }
10
+ });
11
+ Object.defineProperty(exports, "addMonths", {
12
+ enumerable: true,
13
+ get: function () { return chunkSEJ5J4LY_cjs.addMonths; }
14
+ });
15
+ Object.defineProperty(exports, "average", {
16
+ enumerable: true,
17
+ get: function () { return chunkSEJ5J4LY_cjs.average; }
18
+ });
19
+ Object.defineProperty(exports, "capitalize", {
20
+ enumerable: true,
21
+ get: function () { return chunkSEJ5J4LY_cjs.capitalize; }
22
+ });
23
+ Object.defineProperty(exports, "chunk", {
24
+ enumerable: true,
25
+ get: function () { return chunkSEJ5J4LY_cjs.chunk; }
26
+ });
27
+ Object.defineProperty(exports, "clamp", {
28
+ enumerable: true,
29
+ get: function () { return chunkSEJ5J4LY_cjs.clamp; }
30
+ });
31
+ Object.defineProperty(exports, "compact", {
32
+ enumerable: true,
33
+ get: function () { return chunkSEJ5J4LY_cjs.compact; }
34
+ });
35
+ Object.defineProperty(exports, "daysBetween", {
36
+ enumerable: true,
37
+ get: function () { return chunkSEJ5J4LY_cjs.daysBetween; }
38
+ });
39
+ Object.defineProperty(exports, "debounce", {
40
+ enumerable: true,
41
+ get: function () { return chunkSEJ5J4LY_cjs.debounce; }
42
+ });
43
+ Object.defineProperty(exports, "deepClone", {
44
+ enumerable: true,
45
+ get: function () { return chunkSEJ5J4LY_cjs.deepClone; }
46
+ });
47
+ Object.defineProperty(exports, "deepEqual", {
48
+ enumerable: true,
49
+ get: function () { return chunkSEJ5J4LY_cjs.deepEqual; }
50
+ });
51
+ Object.defineProperty(exports, "deepMerge", {
52
+ enumerable: true,
53
+ get: function () { return chunkSEJ5J4LY_cjs.deepMerge; }
54
+ });
55
+ Object.defineProperty(exports, "diff", {
56
+ enumerable: true,
57
+ get: function () { return chunkSEJ5J4LY_cjs.diff; }
58
+ });
59
+ Object.defineProperty(exports, "difference", {
60
+ enumerable: true,
61
+ get: function () { return chunkSEJ5J4LY_cjs.difference; }
62
+ });
63
+ Object.defineProperty(exports, "escapeHtml", {
64
+ enumerable: true,
65
+ get: function () { return chunkSEJ5J4LY_cjs.escapeHtml; }
66
+ });
67
+ Object.defineProperty(exports, "escapeRegExp", {
68
+ enumerable: true,
69
+ get: function () { return chunkSEJ5J4LY_cjs.escapeRegExp; }
70
+ });
71
+ Object.defineProperty(exports, "first", {
72
+ enumerable: true,
73
+ get: function () { return chunkSEJ5J4LY_cjs.first; }
74
+ });
75
+ Object.defineProperty(exports, "flatten", {
76
+ enumerable: true,
77
+ get: function () { return chunkSEJ5J4LY_cjs.flatten; }
78
+ });
79
+ Object.defineProperty(exports, "flattenObject", {
80
+ enumerable: true,
81
+ get: function () { return chunkSEJ5J4LY_cjs.flattenObject; }
82
+ });
83
+ Object.defineProperty(exports, "formatBytes", {
84
+ enumerable: true,
85
+ get: function () { return chunkSEJ5J4LY_cjs.formatBytes; }
86
+ });
87
+ Object.defineProperty(exports, "formatCurrency", {
88
+ enumerable: true,
89
+ get: function () { return chunkSEJ5J4LY_cjs.formatCurrency; }
90
+ });
91
+ Object.defineProperty(exports, "formatDate", {
92
+ enumerable: true,
93
+ get: function () { return chunkSEJ5J4LY_cjs.formatDate; }
94
+ });
95
+ Object.defineProperty(exports, "formatNumber", {
96
+ enumerable: true,
97
+ get: function () { return chunkSEJ5J4LY_cjs.formatNumber; }
98
+ });
99
+ Object.defineProperty(exports, "groupBy", {
100
+ enumerable: true,
101
+ get: function () { return chunkSEJ5J4LY_cjs.groupBy; }
102
+ });
103
+ Object.defineProperty(exports, "hasProperty", {
104
+ enumerable: true,
105
+ get: function () { return chunkSEJ5J4LY_cjs.hasProperty; }
106
+ });
107
+ Object.defineProperty(exports, "intersection", {
108
+ enumerable: true,
109
+ get: function () { return chunkSEJ5J4LY_cjs.intersection; }
110
+ });
111
+ Object.defineProperty(exports, "isArray", {
112
+ enumerable: true,
113
+ get: function () { return chunkSEJ5J4LY_cjs.isArray; }
114
+ });
115
+ Object.defineProperty(exports, "isBoolean", {
116
+ enumerable: true,
117
+ get: function () { return chunkSEJ5J4LY_cjs.isBoolean; }
118
+ });
119
+ Object.defineProperty(exports, "isBrowser", {
120
+ enumerable: true,
121
+ get: function () { return chunkSEJ5J4LY_cjs.isBrowser; }
122
+ });
123
+ Object.defineProperty(exports, "isDefined", {
124
+ enumerable: true,
125
+ get: function () { return chunkSEJ5J4LY_cjs.isDefined; }
126
+ });
127
+ Object.defineProperty(exports, "isEmail", {
128
+ enumerable: true,
129
+ get: function () { return chunkSEJ5J4LY_cjs.isEmail; }
130
+ });
131
+ Object.defineProperty(exports, "isEmpty", {
132
+ enumerable: true,
133
+ get: function () { return chunkSEJ5J4LY_cjs.isEmpty; }
134
+ });
135
+ Object.defineProperty(exports, "isFunction", {
136
+ enumerable: true,
137
+ get: function () { return chunkSEJ5J4LY_cjs.isFunction; }
138
+ });
139
+ Object.defineProperty(exports, "isINN", {
140
+ enumerable: true,
141
+ get: function () { return chunkSEJ5J4LY_cjs.isINN; }
142
+ });
143
+ Object.defineProperty(exports, "isNode", {
144
+ enumerable: true,
145
+ get: function () { return chunkSEJ5J4LY_cjs.isNode; }
146
+ });
147
+ Object.defineProperty(exports, "isNonNullable", {
148
+ enumerable: true,
149
+ get: function () { return chunkSEJ5J4LY_cjs.isNonNullable; }
150
+ });
151
+ Object.defineProperty(exports, "isNumber", {
152
+ enumerable: true,
153
+ get: function () { return chunkSEJ5J4LY_cjs.isNumber; }
154
+ });
155
+ Object.defineProperty(exports, "isObject", {
156
+ enumerable: true,
157
+ get: function () { return chunkSEJ5J4LY_cjs.isObject; }
158
+ });
159
+ Object.defineProperty(exports, "isPhone", {
160
+ enumerable: true,
161
+ get: function () { return chunkSEJ5J4LY_cjs.isPhone; }
162
+ });
163
+ Object.defineProperty(exports, "isSSR", {
164
+ enumerable: true,
165
+ get: function () { return chunkSEJ5J4LY_cjs.isSSR; }
166
+ });
167
+ Object.defineProperty(exports, "isString", {
168
+ enumerable: true,
169
+ get: function () { return chunkSEJ5J4LY_cjs.isString; }
170
+ });
171
+ Object.defineProperty(exports, "isStrongPassword", {
172
+ enumerable: true,
173
+ get: function () { return chunkSEJ5J4LY_cjs.isStrongPassword; }
174
+ });
175
+ Object.defineProperty(exports, "isToday", {
176
+ enumerable: true,
177
+ get: function () { return chunkSEJ5J4LY_cjs.isToday; }
178
+ });
179
+ Object.defineProperty(exports, "isURL", {
180
+ enumerable: true,
181
+ get: function () { return chunkSEJ5J4LY_cjs.isURL; }
182
+ });
183
+ Object.defineProperty(exports, "isYesterday", {
184
+ enumerable: true,
185
+ get: function () { return chunkSEJ5J4LY_cjs.isYesterday; }
186
+ });
187
+ Object.defineProperty(exports, "last", {
188
+ enumerable: true,
189
+ get: function () { return chunkSEJ5J4LY_cjs.last; }
190
+ });
191
+ Object.defineProperty(exports, "mapKeys", {
192
+ enumerable: true,
193
+ get: function () { return chunkSEJ5J4LY_cjs.mapKeys; }
194
+ });
195
+ Object.defineProperty(exports, "mapValues", {
196
+ enumerable: true,
197
+ get: function () { return chunkSEJ5J4LY_cjs.mapValues; }
198
+ });
199
+ Object.defineProperty(exports, "maskString", {
200
+ enumerable: true,
201
+ get: function () { return chunkSEJ5J4LY_cjs.maskString; }
202
+ });
203
+ Object.defineProperty(exports, "median", {
204
+ enumerable: true,
205
+ get: function () { return chunkSEJ5J4LY_cjs.median; }
206
+ });
207
+ Object.defineProperty(exports, "nanoid", {
208
+ enumerable: true,
209
+ get: function () { return chunkSEJ5J4LY_cjs.nanoid; }
210
+ });
211
+ Object.defineProperty(exports, "omit", {
212
+ enumerable: true,
213
+ get: function () { return chunkSEJ5J4LY_cjs.omit; }
214
+ });
215
+ Object.defineProperty(exports, "pLimit", {
216
+ enumerable: true,
217
+ get: function () { return chunkSEJ5J4LY_cjs.pLimit; }
218
+ });
219
+ Object.defineProperty(exports, "pSettle", {
220
+ enumerable: true,
221
+ get: function () { return chunkSEJ5J4LY_cjs.pSettle; }
222
+ });
223
+ Object.defineProperty(exports, "percentage", {
224
+ enumerable: true,
225
+ get: function () { return chunkSEJ5J4LY_cjs.percentage; }
226
+ });
227
+ Object.defineProperty(exports, "pick", {
228
+ enumerable: true,
229
+ get: function () { return chunkSEJ5J4LY_cjs.pick; }
230
+ });
231
+ Object.defineProperty(exports, "pluralize", {
232
+ enumerable: true,
233
+ get: function () { return chunkSEJ5J4LY_cjs.pluralize; }
234
+ });
235
+ Object.defineProperty(exports, "randomInt", {
236
+ enumerable: true,
237
+ get: function () { return chunkSEJ5J4LY_cjs.randomInt; }
238
+ });
239
+ Object.defineProperty(exports, "range", {
240
+ enumerable: true,
241
+ get: function () { return chunkSEJ5J4LY_cjs.range; }
242
+ });
243
+ Object.defineProperty(exports, "relativeTime", {
244
+ enumerable: true,
245
+ get: function () { return chunkSEJ5J4LY_cjs.relativeTime; }
246
+ });
247
+ Object.defineProperty(exports, "retry", {
248
+ enumerable: true,
249
+ get: function () { return chunkSEJ5J4LY_cjs.retry; }
250
+ });
251
+ Object.defineProperty(exports, "round", {
252
+ enumerable: true,
253
+ get: function () { return chunkSEJ5J4LY_cjs.round; }
254
+ });
255
+ Object.defineProperty(exports, "shuffle", {
256
+ enumerable: true,
257
+ get: function () { return chunkSEJ5J4LY_cjs.shuffle; }
258
+ });
259
+ Object.defineProperty(exports, "sleep", {
260
+ enumerable: true,
261
+ get: function () { return chunkSEJ5J4LY_cjs.sleep; }
262
+ });
263
+ Object.defineProperty(exports, "slugify", {
264
+ enumerable: true,
265
+ get: function () { return chunkSEJ5J4LY_cjs.slugify; }
266
+ });
267
+ Object.defineProperty(exports, "sortBy", {
268
+ enumerable: true,
269
+ get: function () { return chunkSEJ5J4LY_cjs.sortBy; }
270
+ });
271
+ Object.defineProperty(exports, "sum", {
272
+ enumerable: true,
273
+ get: function () { return chunkSEJ5J4LY_cjs.sum; }
274
+ });
275
+ Object.defineProperty(exports, "template", {
276
+ enumerable: true,
277
+ get: function () { return chunkSEJ5J4LY_cjs.template; }
278
+ });
279
+ Object.defineProperty(exports, "throttle", {
280
+ enumerable: true,
281
+ get: function () { return chunkSEJ5J4LY_cjs.throttle; }
282
+ });
283
+ Object.defineProperty(exports, "timeout", {
284
+ enumerable: true,
285
+ get: function () { return chunkSEJ5J4LY_cjs.timeout; }
286
+ });
287
+ Object.defineProperty(exports, "toCamelCase", {
288
+ enumerable: true,
289
+ get: function () { return chunkSEJ5J4LY_cjs.toCamelCase; }
290
+ });
291
+ Object.defineProperty(exports, "toKebabCase", {
292
+ enumerable: true,
293
+ get: function () { return chunkSEJ5J4LY_cjs.toKebabCase; }
294
+ });
295
+ Object.defineProperty(exports, "toPascalCase", {
296
+ enumerable: true,
297
+ get: function () { return chunkSEJ5J4LY_cjs.toPascalCase; }
298
+ });
299
+ Object.defineProperty(exports, "toSnakeCase", {
300
+ enumerable: true,
301
+ get: function () { return chunkSEJ5J4LY_cjs.toSnakeCase; }
302
+ });
303
+ Object.defineProperty(exports, "truncate", {
304
+ enumerable: true,
305
+ get: function () { return chunkSEJ5J4LY_cjs.truncate; }
306
+ });
307
+ Object.defineProperty(exports, "tryCatch", {
308
+ enumerable: true,
309
+ get: function () { return chunkSEJ5J4LY_cjs.tryCatch; }
310
+ });
311
+ Object.defineProperty(exports, "tryCatchSync", {
312
+ enumerable: true,
313
+ get: function () { return chunkSEJ5J4LY_cjs.tryCatchSync; }
314
+ });
315
+ Object.defineProperty(exports, "unescapeHtml", {
316
+ enumerable: true,
317
+ get: function () { return chunkSEJ5J4LY_cjs.unescapeHtml; }
318
+ });
319
+ Object.defineProperty(exports, "unique", {
320
+ enumerable: true,
321
+ get: function () { return chunkSEJ5J4LY_cjs.unique; }
322
+ });
323
+ Object.defineProperty(exports, "uniqueBy", {
324
+ enumerable: true,
325
+ get: function () { return chunkSEJ5J4LY_cjs.uniqueBy; }
326
+ });
327
+ Object.defineProperty(exports, "uuid", {
328
+ enumerable: true,
329
+ get: function () { return chunkSEJ5J4LY_cjs.uuid; }
330
+ });
331
+ Object.defineProperty(exports, "zip", {
332
+ enumerable: true,
333
+ get: function () { return chunkSEJ5J4LY_cjs.zip; }
334
+ });
335
+ //# sourceMappingURL=index.cjs.map
336
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,185 @@
1
+ declare function capitalize(str: string): string;
2
+
3
+ declare function escapeHtml(str: string): string;
4
+
5
+ declare function escapeRegExp(str: string): string;
6
+
7
+ declare function maskString(str: string, visibleStart?: number, visibleEnd?: number, maskChar?: string): string;
8
+
9
+ declare function pluralize(count: number, one: string, few: string, many: string): string;
10
+
11
+ declare function slugify(str: string): string;
12
+
13
+ declare function template(str: string, data: Record<string, string | number>): string;
14
+
15
+ declare function toCamelCase(str: string): string;
16
+
17
+ declare function toKebabCase(str: string): string;
18
+
19
+ declare function toPascalCase(str: string): string;
20
+
21
+ declare function toSnakeCase(str: string): string;
22
+
23
+ declare function truncate(str: string, maxLength: number, suffix?: string): string;
24
+
25
+ declare function unescapeHtml(str: string): string;
26
+
27
+ declare function chunk<T>(arr: T[], size: number): T[][];
28
+
29
+ declare function compact<T>(arr: (T | null | undefined | false | 0 | "")[]): T[];
30
+
31
+ declare function difference<T>(a: T[], b: T[]): T[];
32
+
33
+ declare function first<T>(arr: T[]): T | undefined;
34
+
35
+ declare function flatten<T>(arr: unknown[]): T[];
36
+
37
+ declare function groupBy<T, K extends string | number | symbol>(arr: T[], keyFn: (item: T) => K): Record<K, T[]>;
38
+
39
+ declare function intersection<T>(a: T[], b: T[]): T[];
40
+
41
+ declare function last<T>(arr: T[]): T | undefined;
42
+
43
+ declare function range(start: number, end: number, step?: number): number[];
44
+
45
+ declare function shuffle<T>(arr: T[]): T[];
46
+
47
+ declare function sortBy<T>(arr: T[], keyFn: (item: T) => string | number): T[];
48
+
49
+ declare function unique<T>(arr: T[]): T[];
50
+
51
+ declare function uniqueBy<T>(arr: T[], keyFn: (item: T) => unknown): T[];
52
+
53
+ declare function zip<T, U>(a: T[], b: U[]): [T, U][];
54
+
55
+ declare function deepClone<T>(value: T): T;
56
+
57
+ declare function deepEqual(a: unknown, b: unknown): boolean;
58
+
59
+ declare function deepMerge<T extends Record<string, unknown>, S extends Record<string, unknown>>(target: T, source: S): T & S;
60
+
61
+ declare function diff<T extends Record<string, unknown>>(original: T, changed: T): Partial<T>;
62
+
63
+ declare function flattenObject(obj: Record<string, unknown>, prefix?: string, separator?: string): Record<string, unknown>;
64
+
65
+ declare function isEmpty(value: unknown): boolean;
66
+
67
+ declare function mapKeys<T extends Record<string, unknown>>(obj: T, fn: (key: string) => string): Record<string, T[keyof T]>;
68
+
69
+ declare function mapValues<T extends Record<string, unknown>, U>(obj: T, fn: (value: T[keyof T], key: string) => U): Record<string, U>;
70
+
71
+ declare function omit<T extends Record<string, unknown>, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
72
+
73
+ declare function pick<T extends Record<string, unknown>, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
74
+
75
+ declare function average(arr: number[]): number;
76
+
77
+ declare function clamp(value: number, min: number, max: number): number;
78
+
79
+ declare function formatBytes(bytes: number, decimals?: number): string;
80
+
81
+ declare function formatCurrency(value: number, currency?: string, locale?: string): string;
82
+
83
+ declare function formatNumber(value: number, locale?: string): string;
84
+
85
+ declare function median(arr: number[]): number;
86
+
87
+ declare function percentage(value: number, total: number): number;
88
+
89
+ declare function randomInt(min: number, max: number): number;
90
+
91
+ declare function round(value: number, decimals?: number): number;
92
+
93
+ declare function sum(arr: number[]): number;
94
+
95
+ declare function formatDate(date: Date, options?: Intl.DateTimeFormatOptions, locale?: string): string;
96
+
97
+ declare function daysBetween(a: Date, b: Date): number;
98
+
99
+ declare function isToday(date: Date): boolean;
100
+
101
+ declare function isYesterday(date: Date): boolean;
102
+
103
+ declare function addDays(date: Date, days: number): Date;
104
+
105
+ declare function addMonths(date: Date, months: number): Date;
106
+
107
+ declare function relativeTime(date: Date, locale?: string): string;
108
+
109
+ declare function sleep(ms: number): Promise<void>;
110
+
111
+ interface RetryOptions {
112
+ attempts?: number;
113
+ delay?: number;
114
+ factor?: number;
115
+ }
116
+ declare function retry<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
117
+
118
+ declare function debounce<T extends (...args: unknown[]) => void>(fn: T, ms: number): (...args: Parameters<T>) => void;
119
+
120
+ declare function throttle<T extends (...args: unknown[]) => void>(fn: T, ms: number): (...args: Parameters<T>) => void;
121
+
122
+ declare function timeout<T>(promise: Promise<T>, ms: number): Promise<T>;
123
+
124
+ declare function tryCatch<T>(fn: () => Promise<T>): Promise<[null, T] | [Error, null]>;
125
+ declare function tryCatchSync<T>(fn: () => T): [null, T] | [Error, null];
126
+
127
+ declare function pLimit(concurrency: number): <T>(fn: () => Promise<T>) => Promise<T>;
128
+
129
+ interface SettledOk<T> {
130
+ status: "fulfilled";
131
+ value: T;
132
+ }
133
+ interface SettledErr {
134
+ status: "rejected";
135
+ reason: unknown;
136
+ }
137
+ type SettledResult<T> = SettledOk<T> | SettledErr;
138
+ declare function pSettle<T>(promises: Promise<T>[]): Promise<SettledResult<T>[]>;
139
+
140
+ declare function isEmail(str: string): boolean;
141
+
142
+ declare function isURL(str: string): boolean;
143
+
144
+ declare function isPhone(str: string): boolean;
145
+
146
+ declare function isINN(str: string): boolean;
147
+
148
+ interface PasswordOptions {
149
+ minLength?: number;
150
+ lowercase?: boolean;
151
+ uppercase?: boolean;
152
+ digits?: boolean;
153
+ special?: boolean;
154
+ }
155
+ declare function isStrongPassword(str: string, options?: PasswordOptions): boolean;
156
+
157
+ declare function isString(value: unknown): value is string;
158
+
159
+ declare function isNumber(value: unknown): value is number;
160
+
161
+ declare function isBoolean(value: unknown): value is boolean;
162
+
163
+ declare function isNonNullable<T>(value: T): value is NonNullable<T>;
164
+
165
+ declare function isArray(value: unknown): value is unknown[];
166
+
167
+ declare function isObject(value: unknown): value is Record<string, unknown>;
168
+
169
+ declare function isFunction(value: unknown): value is (...args: unknown[]) => unknown;
170
+
171
+ declare function isDefined<T>(value: T | undefined): value is T;
172
+
173
+ declare function hasProperty<K extends string>(obj: unknown, key: K): obj is Record<K, unknown>;
174
+
175
+ declare function isBrowser(): boolean;
176
+
177
+ declare function isNode(): boolean;
178
+
179
+ declare function isSSR(): boolean;
180
+
181
+ declare function nanoid(size?: number): string;
182
+
183
+ declare function uuid(): string;
184
+
185
+ export { type PasswordOptions, type RetryOptions, type SettledErr, type SettledOk, type SettledResult, addDays, addMonths, average, capitalize, chunk, clamp, compact, daysBetween, debounce, deepClone, deepEqual, deepMerge, diff, difference, escapeHtml, escapeRegExp, first, flatten, flattenObject, formatBytes, formatCurrency, formatDate, formatNumber, groupBy, hasProperty, intersection, isArray, isBoolean, isBrowser, isDefined, isEmail, isEmpty, isFunction, isINN, isNode, isNonNullable, isNumber, isObject, isPhone, isSSR, isString, isStrongPassword, isToday, isURL, isYesterday, last, mapKeys, mapValues, maskString, median, nanoid, omit, pLimit, pSettle, percentage, pick, pluralize, randomInt, range, relativeTime, retry, round, shuffle, sleep, slugify, sortBy, sum, template, throttle, timeout, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, truncate, tryCatch, tryCatchSync, unescapeHtml, unique, uniqueBy, uuid, zip };