@anil-labs/collection-js 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.
- package/LICENSE +21 -0
- package/README.md +251 -0
- package/dist/index.es.js +3211 -0
- package/dist/index.umd.cjs +8 -0
- package/dist/src/async/AsyncCollection.d.ts +57 -0
- package/dist/src/async/concurrent.d.ts +6 -0
- package/dist/src/async/index.d.ts +3 -0
- package/dist/src/collection/Collection.d.ts +274 -0
- package/dist/src/collection/HigherOrderProxy.d.ts +19 -0
- package/dist/src/collection/LazyCollection.d.ts +173 -0
- package/dist/src/collection/index.d.ts +5 -0
- package/dist/src/contracts/Arrayable.d.ts +4 -0
- package/dist/src/contracts/Enumerable.d.ts +17 -0
- package/dist/src/contracts/Jsonable.d.ts +3 -0
- package/dist/src/contracts/Macroable.d.ts +6 -0
- package/dist/src/contracts/index.d.ts +5 -0
- package/dist/src/exceptions/CollectionException.d.ts +3 -0
- package/dist/src/exceptions/ItemNotFoundException.d.ts +4 -0
- package/dist/src/exceptions/MultipleItemsFoundException.d.ts +5 -0
- package/dist/src/exceptions/UnexpectedValueException.d.ts +4 -0
- package/dist/src/exceptions/index.d.ts +4 -0
- package/dist/src/helpers/collect.d.ts +3 -0
- package/dist/src/helpers/index.d.ts +2 -0
- package/dist/src/helpers/lazy.d.ts +3 -0
- package/dist/src/index.d.ts +31 -0
- package/dist/src/io/csv.d.ts +30 -0
- package/dist/src/io/index.d.ts +5 -0
- package/dist/src/io/jsonl.d.ts +9 -0
- package/dist/src/io/streams.d.ts +27 -0
- package/dist/src/macros/Macroable.d.ts +20 -0
- package/dist/src/macros/index.d.ts +1 -0
- package/dist/src/operations/accessors.d.ts +19 -0
- package/dist/src/operations/aggregations.d.ts +9 -0
- package/dist/src/operations/chunking.d.ts +13 -0
- package/dist/src/operations/combine.d.ts +4 -0
- package/dist/src/operations/compare.d.ts +29 -0
- package/dist/src/operations/conditionals.d.ts +7 -0
- package/dist/src/operations/filters.d.ts +27 -0
- package/dist/src/operations/grouping.d.ts +5 -0
- package/dist/src/operations/index.d.ts +22 -0
- package/dist/src/operations/itertools.d.ts +37 -0
- package/dist/src/operations/joins.d.ts +17 -0
- package/dist/src/operations/mutations.d.ts +40 -0
- package/dist/src/operations/objectOps.d.ts +10 -0
- package/dist/src/operations/random.d.ts +2 -0
- package/dist/src/operations/reducers.d.ts +9 -0
- package/dist/src/operations/sequence.d.ts +4 -0
- package/dist/src/operations/setOps.d.ts +14 -0
- package/dist/src/operations/sliceOps.d.ts +8 -0
- package/dist/src/operations/sorting.d.ts +11 -0
- package/dist/src/operations/stats.d.ts +30 -0
- package/dist/src/operations/strings.d.ts +2 -0
- package/dist/src/operations/transformations.d.ts +9 -0
- package/dist/src/operations/uniqueness.d.ts +3 -0
- package/dist/src/support/arrayWrap.d.ts +6 -0
- package/dist/src/support/dataGet.d.ts +8 -0
- package/dist/src/support/deepClone.d.ts +1 -0
- package/dist/src/support/deepEqual.d.ts +11 -0
- package/dist/src/support/index.d.ts +8 -0
- package/dist/src/support/isObject.d.ts +4 -0
- package/dist/src/support/operatorForWhere.d.ts +4 -0
- package/dist/src/support/types.d.ts +15 -0
- package/dist/src/support/valueRetriever.d.ts +7 -0
- package/package.json +93 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure-style mutation helpers — they always return a new array. Helpers that
|
|
3
|
+
* also need a removed-value tuple (`pop`, `shift`, `splice`) return both pieces.
|
|
4
|
+
*/
|
|
5
|
+
export declare function pushOf<T>(items: readonly T[], values: readonly T[]): T[];
|
|
6
|
+
export declare function prependOf<T>(items: readonly T[], value: T): T[];
|
|
7
|
+
export declare function concatOf<T, U>(items: readonly T[], other: readonly U[]): (T | U)[];
|
|
8
|
+
export declare function popOf<T>(items: readonly T[], count?: number): {
|
|
9
|
+
remaining: T[];
|
|
10
|
+
removed: T[];
|
|
11
|
+
};
|
|
12
|
+
export declare function shiftOf<T>(items: readonly T[], count?: number): {
|
|
13
|
+
remaining: T[];
|
|
14
|
+
removed: T[];
|
|
15
|
+
};
|
|
16
|
+
export declare function spliceOf<T>(items: readonly T[], start: number, deleteCount?: number, replacements?: readonly T[]): {
|
|
17
|
+
remaining: T[];
|
|
18
|
+
removed: T[];
|
|
19
|
+
};
|
|
20
|
+
export declare function pullOf<T>(items: readonly T[], target: T): {
|
|
21
|
+
remaining: T[];
|
|
22
|
+
removed: T | undefined;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* `forget(key)` — supports numeric indexes (delete element at index) and
|
|
26
|
+
* string keys (delete property from each object element).
|
|
27
|
+
*/
|
|
28
|
+
export declare function forgetOf<T>(items: readonly T[], keys: readonly (number | string)[]): T[];
|
|
29
|
+
export declare function putOf<T extends object, K extends keyof T>(items: readonly T[], key: K, value: T[K]): T[];
|
|
30
|
+
/** Recursive object merge (Laravel `mergeRecursive`). */
|
|
31
|
+
export declare function mergeRecursiveOf<T>(items: readonly T[], ...others: readonly (readonly T[])[]): T[];
|
|
32
|
+
/**
|
|
33
|
+
* Shallow merge mirroring Laravel: a collection wrapping a single plain object
|
|
34
|
+
* models an associative array, so merging two such collections overwrites
|
|
35
|
+
* matching string keys (`{a,b}` ⊕ `{b,c}` → `{a,b',c}`). Any other shape —
|
|
36
|
+
* including a genuine list of multiple objects — is treated positionally and
|
|
37
|
+
* the values are appended. This avoids silently collapsing `[{a},{b}]` into a
|
|
38
|
+
* single object.
|
|
39
|
+
*/
|
|
40
|
+
export declare function mergeOf<T, U>(items: readonly T[], other: readonly U[]): (T | U)[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function pluckOf<T>(items: readonly T[], key: string, keyBy?: string): unknown[] | Record<string, unknown>;
|
|
2
|
+
export declare function onlyOf<T extends object>(items: readonly T[], keys: readonly (keyof T | string)[]): Partial<T>[];
|
|
3
|
+
export declare function exceptOf<T extends object>(items: readonly T[], keys: readonly (keyof T | string)[]): Partial<T>[];
|
|
4
|
+
export declare function selectOf<T extends object, K extends keyof T>(items: readonly T[], keys: K | readonly K[]): Pick<T, K>[];
|
|
5
|
+
export declare function flipOf(items: readonly unknown[]): Record<string, number>;
|
|
6
|
+
export declare function keysOf<T>(items: readonly T[]): string[];
|
|
7
|
+
export declare function dotOf(items: readonly unknown[]): Record<string, unknown>;
|
|
8
|
+
export declare function undotOf(items: readonly unknown[]): Record<string, unknown>;
|
|
9
|
+
export declare function replaceShallow<T>(items: readonly T[], replacements: Record<number, T>): T[];
|
|
10
|
+
export declare function replaceRecursiveOf<T>(items: readonly T[], patches: readonly unknown[]): T[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function reduceOf<T, R>(items: readonly T[], fn: (carry: R, item: T, index: number) => R, initial: R): R;
|
|
2
|
+
/**
|
|
3
|
+
* Spread reduce — the reducer is called with the carry tuple spread, followed
|
|
4
|
+
* by the current item and its index, and returns the next carry tuple. Mirrors
|
|
5
|
+
* Laravel's `reduceSpread`:
|
|
6
|
+
*
|
|
7
|
+
* reduceSpread((a, b, item) => [a + item, b * item], 0, 1)
|
|
8
|
+
*/
|
|
9
|
+
export declare function reduceSpreadOf<T, R extends readonly unknown[]>(items: readonly T[], fn: (...args: readonly unknown[]) => R, ...initials: R): R;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function rangeOf(start: number, end: number, step?: number): number[];
|
|
2
|
+
export declare function timesOf<T>(count: number, factory: (n: number) => T): T[];
|
|
3
|
+
export declare function multiplyOf<T>(items: readonly T[], factor: number): T[];
|
|
4
|
+
export declare function padOf<T>(items: readonly T[], size: number, value: T): T[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function diffOf<T>(items: readonly T[], other: readonly T[]): T[];
|
|
2
|
+
export declare function diffAssocOf<T>(items: readonly T[], other: readonly Partial<T>[]): T[];
|
|
3
|
+
export declare function diffAssocUsingOf<T>(items: readonly T[], other: readonly T[], comparator: (a: T, b: T) => number): T[];
|
|
4
|
+
export declare function diffKeysOf<T extends object>(items: readonly T[], otherKeys: readonly (keyof T | string)[]): T[];
|
|
5
|
+
export declare function intersectOf<T>(items: readonly T[], other: readonly T[]): T[];
|
|
6
|
+
export declare function intersectUsingOf<T>(items: readonly T[], other: readonly T[], comparator: (a: T, b: T) => number): T[];
|
|
7
|
+
export declare function intersectAssocOf<T extends object>(items: readonly T[], other: readonly Partial<T>[]): T[];
|
|
8
|
+
export declare function intersectAssocUsingOf<T extends object>(items: readonly T[], other: Record<string, unknown>, comparator: (a: string, b: string) => number): T[];
|
|
9
|
+
export declare function intersectByKeysOf<T extends object>(items: readonly T[], otherKeys: readonly (keyof T | string)[]): T[];
|
|
10
|
+
export declare function unionOf<T>(items: readonly T[], other: readonly T[]): T[];
|
|
11
|
+
/** Object-keyed union — original collection's keys take precedence. */
|
|
12
|
+
export declare function unionObjectsOf<T extends object>(items: readonly T[], other: readonly T[]): T[];
|
|
13
|
+
export declare function crossJoinOf<T>(...arrays: readonly (readonly T[])[]): T[][];
|
|
14
|
+
export declare function duplicatesOf<T>(items: readonly T[], by?: (item: T) => unknown, strict?: boolean): Map<number, T>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Predicate } from '../../support/types';
|
|
2
|
+
export declare function takeOf<T>(items: readonly T[], count: number): T[];
|
|
3
|
+
export declare function takeUntilOf<T>(items: readonly T[], target: T | Predicate<T>): T[];
|
|
4
|
+
export declare function takeWhileOf<T>(items: readonly T[], predicate: Predicate<T>): T[];
|
|
5
|
+
export declare function skipOf<T>(items: readonly T[], count: number): T[];
|
|
6
|
+
export declare function skipUntilOf<T>(items: readonly T[], target: T | Predicate<T>): T[];
|
|
7
|
+
export declare function skipWhileOf<T>(items: readonly T[], predicate: Predicate<T>): T[];
|
|
8
|
+
export declare function sliceOf<T>(items: readonly T[], start: number, length?: number): T[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RetrieverInput } from '../../support/valueRetriever';
|
|
2
|
+
import { Comparator, SortDirection } from '../../support/types';
|
|
3
|
+
export declare function sortOf<T>(items: readonly T[], comparator?: Comparator<T>): T[];
|
|
4
|
+
export declare function sortDescOf<T>(items: readonly T[]): T[];
|
|
5
|
+
export type SortBySpec<T> = RetrieverInput<T, unknown> | readonly [RetrieverInput<T, unknown>, SortDirection] | Comparator<T>;
|
|
6
|
+
export declare function sortByOf<T>(items: readonly T[], spec: SortBySpec<T> | readonly SortBySpec<T>[], descending?: boolean): T[];
|
|
7
|
+
export declare function sortByDescOf<T>(items: readonly T[], spec: SortBySpec<T>): T[];
|
|
8
|
+
export declare function sortKeysOf<T extends object>(items: readonly T[], descending?: boolean): T[];
|
|
9
|
+
export declare function sortKeysUsingOf<T extends object>(items: readonly T[], comparator: (a: string, b: string) => number): T[];
|
|
10
|
+
export declare function shuffleOf<T>(items: readonly T[], random?: () => number): T[];
|
|
11
|
+
export declare function reverseOf<T>(items: readonly T[]): T[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RetrieverInput } from '../../support/valueRetriever';
|
|
2
|
+
/** Population variance (divides by N). For sample variance, use `sampleVarianceOf`. */
|
|
3
|
+
export declare function varianceOf<T>(items: readonly T[], by?: RetrieverInput<T, number>): number | undefined;
|
|
4
|
+
/** Sample variance (divides by N-1). Returns `undefined` for fewer than 2 samples. */
|
|
5
|
+
export declare function sampleVarianceOf<T>(items: readonly T[], by?: RetrieverInput<T, number>): number | undefined;
|
|
6
|
+
export declare function stddevOf<T>(items: readonly T[], by?: RetrieverInput<T, number>): number | undefined;
|
|
7
|
+
export declare function sampleStddevOf<T>(items: readonly T[], by?: RetrieverInput<T, number>): number | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Quantile via linear interpolation between closest ranks (matches numpy/R type 7).
|
|
10
|
+
* `q` is in [0, 1]. Returns undefined for empty input.
|
|
11
|
+
*/
|
|
12
|
+
export declare function quantileOf<T>(items: readonly T[], q: number, by?: RetrieverInput<T, number>): number | undefined;
|
|
13
|
+
export declare function percentileOf<T>(items: readonly T[], p: number, by?: RetrieverInput<T, number>): number | undefined;
|
|
14
|
+
export interface HistogramBin {
|
|
15
|
+
count: number;
|
|
16
|
+
/** Lower bound (inclusive). */
|
|
17
|
+
from: number;
|
|
18
|
+
/** Upper bound (exclusive, except for the last bin which is inclusive). */
|
|
19
|
+
to: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Equal-width histogram with `bins` buckets. `range` is auto-computed when
|
|
23
|
+
* not supplied. Empty input returns an empty array.
|
|
24
|
+
*/
|
|
25
|
+
export declare function histogramOf<T>(items: readonly T[], bins: number, options?: {
|
|
26
|
+
by?: RetrieverInput<T, number>;
|
|
27
|
+
range?: readonly [number, number];
|
|
28
|
+
}): HistogramBin[];
|
|
29
|
+
/** Pearson correlation between two numeric extractors over the same items. */
|
|
30
|
+
export declare function correlationOf<T>(items: readonly T[], xBy: RetrieverInput<T, number>, yBy: RetrieverInput<T, number>): number | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClassConstructor } from '../../support/types';
|
|
2
|
+
export declare function mapOf<T, R>(items: readonly T[], fn: (item: T, index: number) => R): R[];
|
|
3
|
+
export declare function mapIntoOf<T, R>(items: readonly T[], Ctor: ClassConstructor<R, [T]>): R[];
|
|
4
|
+
export declare function mapSpreadOf<R>(items: ReadonlyArray<readonly unknown[]>, fn: (...args: readonly unknown[]) => R): R[];
|
|
5
|
+
export declare function mapToGroupsOf<T, K extends PropertyKey, V>(items: readonly T[], fn: (item: T, index: number) => readonly [K, V]): Record<K, V[]>;
|
|
6
|
+
export declare function mapWithKeysOf<T, K extends PropertyKey, V>(items: readonly T[], fn: (item: T, index: number) => readonly [K, V]): Record<K, V>;
|
|
7
|
+
export declare function flatMapOf<T, R>(items: readonly T[], fn: (item: T, index: number) => R | readonly R[]): R[];
|
|
8
|
+
export declare function flattenOf(items: readonly unknown[], depth?: number): unknown[];
|
|
9
|
+
export declare function collapseOf<T>(items: readonly (readonly T[] | T)[]): T[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Convert any iterable / Arrayable / single value into a plain array. */
|
|
2
|
+
export declare function toArray<T>(value: Iterable<T> | ArrayLike<T> | T): T[];
|
|
3
|
+
/** Wrap a non-array value into an array. Null/undefined become an empty array. */
|
|
4
|
+
export declare function arrayWrap<T>(value: T | T[] | null | undefined): T[];
|
|
5
|
+
/** Identity transform — preserves the input when already an array. */
|
|
6
|
+
export declare function ensureArray<T>(value: Iterable<T> | T[]): T[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a nested value from an object/array using "dot" notation, mirroring
|
|
3
|
+
* Laravel's `data_get` helper. Supports `*` to traverse arrays and produces
|
|
4
|
+
* arrays of leaf values when wildcards are used.
|
|
5
|
+
*/
|
|
6
|
+
export declare function dataGet(target: unknown, path: string | readonly string[], defaultValue?: unknown): unknown;
|
|
7
|
+
/** Set a nested value via dot path; mutates and returns the target. */
|
|
8
|
+
export declare function dataSet(target: Record<string, unknown>, path: string, value: unknown): Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function deepClone<T>(value: T): T;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursive structural equality for arrays, plain objects, primitives, Date, RegExp.
|
|
3
|
+
* Cycles are not handled — assume DAG-shaped data (typical for collection items).
|
|
4
|
+
*/
|
|
5
|
+
export declare function deepEqual<T>(a: T, b: T): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Loose comparison emulating PHP's `==` for the common cases used in
|
|
8
|
+
* Laravel collections (strings vs numbers, etc.). Falls back to deep equality
|
|
9
|
+
* for object-like values.
|
|
10
|
+
*/
|
|
11
|
+
export declare function looseEqual(a: unknown, b: unknown): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from '../../support/types';
|
|
2
|
+
export * from '../../support/isObject';
|
|
3
|
+
export * from '../../support/deepEqual';
|
|
4
|
+
export * from '../../support/deepClone';
|
|
5
|
+
export * from '../../support/dataGet';
|
|
6
|
+
export * from '../../support/valueRetriever';
|
|
7
|
+
export * from '../../support/operatorForWhere';
|
|
8
|
+
export * from '../../support/arrayWrap';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PlainObject } from '../../support/types';
|
|
2
|
+
export declare function isPlainObject(value: unknown): value is PlainObject;
|
|
3
|
+
export declare function isObjectLike(value: unknown): value is Record<string, unknown>;
|
|
4
|
+
export declare function isFunction(value: unknown): value is (...args: readonly unknown[]) => unknown;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Operator } from '../../support/types';
|
|
2
|
+
/** Compare two values using a Laravel-style operator string. */
|
|
3
|
+
export declare function operatorForWhere(retrieved: unknown, operator: Operator, value: unknown): boolean;
|
|
4
|
+
export declare function isOperator(value: unknown): value is Operator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PlainObject = Record<string, unknown>;
|
|
2
|
+
export type Scalar = string | number | bigint | boolean | symbol;
|
|
3
|
+
export type Comparable = string | number | bigint | boolean | Date;
|
|
4
|
+
export type Operator = '=' | '==' | '===' | '!=' | '!==' | '<>' | '<' | '<=' | '>' | '>=';
|
|
5
|
+
export type SortDirection = 'asc' | 'desc';
|
|
6
|
+
export type Predicate<T> = (item: T, key: number) => boolean;
|
|
7
|
+
export type Iteratee<T, R = unknown> = ((item: T, key: number) => R) | keyof T | string;
|
|
8
|
+
export type ValueOf<T, K> = K extends keyof T ? T[K] : unknown;
|
|
9
|
+
export type Comparator<T> = (a: T, b: T) => number;
|
|
10
|
+
export type FlattenDepth1<T> = T extends ReadonlyArray<infer U> ? U : T;
|
|
11
|
+
export type FlattenDepth2<T> = T extends ReadonlyArray<infer U> ? FlattenDepth1<U> : T;
|
|
12
|
+
export type FlattenDepth3<T> = T extends ReadonlyArray<infer U> ? FlattenDepth2<U> : T;
|
|
13
|
+
/** Approximation; for unbounded depth use `unknown` at runtime. */
|
|
14
|
+
export type DeepFlatten<T> = T extends ReadonlyArray<infer U> ? DeepFlatten<U> : T;
|
|
15
|
+
export type ClassConstructor<T, A extends readonly unknown[] = readonly unknown[]> = new (...args: A) => T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type RetrieverInput<T, R = unknown> = ((item: T, index: number) => R) | keyof T | string;
|
|
2
|
+
/**
|
|
3
|
+
* Convert a key, dot-path, or function into a normalized accessor. Used by
|
|
4
|
+
* groupBy, keyBy, sortBy, sum-with-key, etc. — any operation that accepts
|
|
5
|
+
* either a callback or a property reference.
|
|
6
|
+
*/
|
|
7
|
+
export declare function valueRetriever<T, R = unknown>(source: RetrieverInput<T, R> | undefined): (item: T, index: number) => R;
|
package/package.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@anil-labs/collection-js",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A fluent, Laravel-inspired Collection library for JavaScript and TypeScript. Provides 120+ chainable methods for elegant array manipulation.",
|
|
5
|
+
"private": false,
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.umd.cjs",
|
|
9
|
+
"module": "dist/index.es.js",
|
|
10
|
+
"types": "dist/src/index.d.ts",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/src/index.d.ts",
|
|
21
|
+
"import": "./dist/index.es.js",
|
|
22
|
+
"require": "./dist/index.umd.cjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/anilkumarthakur60/collection-js.git"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/anilkumarthakur60/collection-js#readme",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/anilkumarthakur60/collection-js/issues"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=16"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@types/node": ">=16"
|
|
38
|
+
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"@types/node": {
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"dev": "vite",
|
|
46
|
+
"build": "tsc && vite build",
|
|
47
|
+
"prepublishOnly": "npm run build && npm test",
|
|
48
|
+
"preview": "vite preview",
|
|
49
|
+
"test": "jest",
|
|
50
|
+
"lint": "eslint . --fix",
|
|
51
|
+
"format": "prettier --write src/ docs/",
|
|
52
|
+
"lint-format": "npm run lint && npm run format",
|
|
53
|
+
"docs:dev": "vitepress dev docs",
|
|
54
|
+
"docs:build": "vitepress build docs",
|
|
55
|
+
"docs:preview": "vitepress preview docs",
|
|
56
|
+
"ctf": "clear && npm run format && npm run lint && npm run test"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@eslint/js": "^10.0.1",
|
|
60
|
+
"@rushstack/eslint-patch": "^1.16.1",
|
|
61
|
+
"@types/jest": "^30.0.0",
|
|
62
|
+
"@types/node": "^25.9.1",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.57.1",
|
|
64
|
+
"@typescript-eslint/parser": "^8.57.1",
|
|
65
|
+
"eslint": "^10.1.0",
|
|
66
|
+
"eslint-plugin-perfectionist": "^5.7.0",
|
|
67
|
+
"jest": "^30.4.2",
|
|
68
|
+
"prettier": "^3.8.3",
|
|
69
|
+
"ts-jest": "^29.4.11",
|
|
70
|
+
"ts-node": "^10.9.2",
|
|
71
|
+
"typescript": "^6.0.3",
|
|
72
|
+
"typescript-eslint": "^8.57.1",
|
|
73
|
+
"vite": "^8.0.14",
|
|
74
|
+
"vite-plugin-dts": "^4.5.4",
|
|
75
|
+
"vitepress": "^1.6.4"
|
|
76
|
+
},
|
|
77
|
+
"keywords": [
|
|
78
|
+
"collection",
|
|
79
|
+
"data-structure",
|
|
80
|
+
"typescript",
|
|
81
|
+
"javascript",
|
|
82
|
+
"library",
|
|
83
|
+
"laravel",
|
|
84
|
+
"laravel-collections",
|
|
85
|
+
"collection-js",
|
|
86
|
+
"collection-ts",
|
|
87
|
+
"array",
|
|
88
|
+
"fluent",
|
|
89
|
+
"chainable",
|
|
90
|
+
"functional",
|
|
91
|
+
"manipulation"
|
|
92
|
+
]
|
|
93
|
+
}
|