iterable-linq-utility 0.0.16 → 0.2.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/README.md +72 -0
- package/dist/index.d.cts +875 -0
- package/dist/index.d.ts +875 -14
- package/dist/iterable-linq-utility.js +641 -0
- package/dist/iterable-linq-utility.umd.cjs +1 -0
- package/package.json +42 -24
- package/dist/collections/index.d.ts +0 -2
- package/dist/collections/linkedList.d.ts +0 -24
- package/dist/functions/collectToArray.d.ts +0 -1
- package/dist/functions/empty.d.ts +0 -1
- package/dist/functions/filter.d.ts +0 -9
- package/dist/functions/flatMap.d.ts +0 -8
- package/dist/functions/forEach.d.ts +0 -3
- package/dist/functions/index.d.ts +0 -23
- package/dist/functions/map.d.ts +0 -9
- package/dist/functions/materialize.d.ts +0 -7
- package/dist/functions/max.d.ts +0 -9
- package/dist/functions/memoize.d.ts +0 -11
- package/dist/functions/min.d.ts +0 -9
- package/dist/functions/range.d.ts +0 -7
- package/dist/functions/reduce.d.ts +0 -10
- package/dist/functions/repeat.d.ts +0 -1
- package/dist/functions/some.d.ts +0 -9
- package/dist/functions/tap.d.ts +0 -9
- package/dist/functions/tapChain.d.ts +0 -9
- package/dist/interable-linq-utility.js +0 -708
- package/dist/interable-linq-utility.umd.cjs +0 -1
- package/dist/linqIterable.d.ts +0 -45
- package/dist/types/action.d.ts +0 -3
- package/dist/types/comparer.d.ts +0 -4
- package/dist/types/index.d.ts +0 -7
- package/dist/types/mapper.d.ts +0 -1
- package/dist/types/predicate.d.ts +0 -1
- package/dist/types/reducer.d.ts +0 -1
- package/dist/types/tapper.d.ts +0 -2
- package/dist/types/unit.d.ts +0 -3
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/iteratorResults.d.ts +0 -4
- package/dist/utils/utils.d.ts +0 -56
- package/dist/utils/validations.d.ts +0 -5
package/package.json
CHANGED
|
@@ -1,26 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iterable-linq-utility",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "An Iterable mutation utility inspired by .net Linq and Javascript Array interface",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/
|
|
7
|
-
"module": "./dist/
|
|
6
|
+
"main": "./dist/iterable-linq-utility.umd.cjs",
|
|
7
|
+
"module": "./dist/iterable-linq-utility.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"import":
|
|
12
|
-
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/iterable-linq-utility.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/iterable-linq-utility.umd.cjs"
|
|
18
|
+
}
|
|
13
19
|
}
|
|
14
20
|
},
|
|
15
21
|
"files": [
|
|
16
22
|
"dist"
|
|
17
23
|
],
|
|
18
24
|
"scripts": {
|
|
19
|
-
"build": "tsc -p tsconfig.build.json && vite build",
|
|
25
|
+
"build": "tsc -p tsconfig.build.json && vite build && cp dist/index.d.ts dist/index.d.cts",
|
|
26
|
+
"check:package": "attw --pack .",
|
|
27
|
+
"check:changeset": "changeset status --since=origin/main",
|
|
28
|
+
"check:since": "node scripts/check-since.ts",
|
|
29
|
+
"check:instructions": "node scripts/check-instructions.ts",
|
|
30
|
+
"check:structure": "node scripts/check-structure.ts",
|
|
20
31
|
"dev": "vite",
|
|
21
|
-
"lint": "eslint .
|
|
22
|
-
"lint-fix": "eslint . --
|
|
32
|
+
"lint": "eslint .",
|
|
33
|
+
"lint-fix": "eslint . --fix",
|
|
34
|
+
"release:version": "changeset version && node scripts/set-since.ts",
|
|
35
|
+
"typecheck": "tsc -p tsconfig.test.json --noEmit",
|
|
23
36
|
"test": "vitest run",
|
|
37
|
+
"bench": "vite build --logLevel error && vitest bench --run",
|
|
38
|
+
"bench:baseline": "vite build --logLevel error && BENCH_SAVE=1 vitest bench --run",
|
|
24
39
|
"test:coverage": "vitest run --coverage",
|
|
25
40
|
"test:ui": "vitest --ui"
|
|
26
41
|
},
|
|
@@ -40,20 +55,23 @@
|
|
|
40
55
|
"utility"
|
|
41
56
|
],
|
|
42
57
|
"devDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"eslint
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
58
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
59
|
+
"@changesets/changelog-github": "^1.0.1",
|
|
60
|
+
"@changesets/cli": "^3.0.3",
|
|
61
|
+
"@eslint/js": "^10.0.1",
|
|
62
|
+
"@microsoft/api-extractor": "^7.59.2",
|
|
63
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
64
|
+
"@types/node": "^24.19.0",
|
|
65
|
+
"@vitest/coverage-istanbul": "^5.0.2",
|
|
66
|
+
"@vitest/ui": "^5.0.2",
|
|
67
|
+
"eslint": "^10.11.0",
|
|
68
|
+
"eslint-plugin-tsdoc": "^0.5.3",
|
|
69
|
+
"globals": "^17.12.0",
|
|
70
|
+
"typescript": "^6.0.3",
|
|
71
|
+
"typescript-eslint": "^8.70.1",
|
|
72
|
+
"vite": "^8.3.1",
|
|
73
|
+
"vite-plugin-dts": "^5.1.1",
|
|
74
|
+
"vitest": "^5.0.2"
|
|
75
|
+
},
|
|
76
|
+
"packageManager": "pnpm@11.24.0"
|
|
59
77
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare function from<T>(iterable: Iterable<T>): LinkedList<T>;
|
|
2
|
-
export declare class LinkedList<T> implements Iterable<T> {
|
|
3
|
-
private internalSize;
|
|
4
|
-
private head;
|
|
5
|
-
private tail;
|
|
6
|
-
[Symbol.iterator](): LinkedListIterator<T>;
|
|
7
|
-
private internalAddFirst;
|
|
8
|
-
addFirst(value: T): this;
|
|
9
|
-
private internalAddLast;
|
|
10
|
-
addLast(value: T): this;
|
|
11
|
-
size(): number;
|
|
12
|
-
}
|
|
13
|
-
export declare class LinkedListIterator<T> implements Iterator<T> {
|
|
14
|
-
private current;
|
|
15
|
-
constructor(current: IListNode<T> | null);
|
|
16
|
-
private innerNext;
|
|
17
|
-
next(): IteratorResult<T, any>;
|
|
18
|
-
return(value?: any): IteratorResult<T, any>;
|
|
19
|
-
}
|
|
20
|
-
interface IListNode<T> {
|
|
21
|
-
data: T;
|
|
22
|
-
nextNode: IListNode<T> | null;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function collectToArray<T>(iterable: Iterable<T>): T[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function empty<T>(): Iterable<T>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { collectToArray } from './collectToArray';
|
|
2
|
-
export { collectToArray };
|
|
3
|
-
import { empty } from './empty';
|
|
4
|
-
export { empty };
|
|
5
|
-
import { filter } from './filter';
|
|
6
|
-
import { flatMap } from './flatMap';
|
|
7
|
-
import { forEach, forEachAsync } from './forEach';
|
|
8
|
-
export { filter, flatMap, forEach, forEachAsync };
|
|
9
|
-
import { map } from './map';
|
|
10
|
-
import { materialize } from './materialize';
|
|
11
|
-
import { max } from './max';
|
|
12
|
-
import { memoize, getMemoizeDefaultOptions, IMemoizeOptions } from './memoize';
|
|
13
|
-
import { min } from './min';
|
|
14
|
-
export { map, materialize, max, memoize, getMemoizeDefaultOptions, type IMemoizeOptions, min };
|
|
15
|
-
import { range } from './range';
|
|
16
|
-
import { reduce } from './reduce';
|
|
17
|
-
import { repeat } from './repeat';
|
|
18
|
-
export { range, reduce, repeat };
|
|
19
|
-
import { some } from './some';
|
|
20
|
-
export { some };
|
|
21
|
-
import { tap } from './tap';
|
|
22
|
-
import { tapChain } from './tapChain';
|
|
23
|
-
export { tap, tapChain };
|
package/dist/functions/map.d.ts
DELETED
package/dist/functions/max.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface IMemoizeOptions {
|
|
2
|
-
allowPartialMemoization?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export declare function getMemoizeDefaultOptions(): IMemoizeOptions;
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @operation `Transformation`
|
|
8
|
-
* @param iterable
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
export declare function memoize<T>(iterable: Iterable<T>, options?: IMemoizeOptions): Iterable<T>;
|
package/dist/functions/min.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function range(end: number): Iterable<number>;
|
|
2
|
-
export declare function range(end: number, reverse?: boolean): Iterable<number>;
|
|
3
|
-
export declare function range(start: number, end: number): Iterable<number>;
|
|
4
|
-
export declare function range(start: number, end: number, step: number): Iterable<number>;
|
|
5
|
-
export declare function range(start: number, end: number, reverse: boolean): Iterable<number>;
|
|
6
|
-
export declare function range(start: number, end: number, step: number, reverse: boolean): Iterable<number>;
|
|
7
|
-
export declare function range(start: number, end?: number | boolean, step?: number | boolean, reverse?: boolean): Iterable<number>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Reducer } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @operation `Action`
|
|
5
|
-
* @param iterable
|
|
6
|
-
* @param neutralElement
|
|
7
|
-
* @param reducer
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export declare function reduce<T, R>(iterable: Iterable<T>, neutralElement: R, reducer: Reducer<T, R>): R;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function repeat<T>(value: T, count: number): Iterable<T>;
|
package/dist/functions/some.d.ts
DELETED
package/dist/functions/tap.d.ts
DELETED