@xylabs/set 5.0.84 → 5.0.86
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 +31 -48
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
|
|
17
17
|
|
|
18
|
+
|
|
19
|
+
|
|
18
20
|
## Reference
|
|
19
21
|
|
|
20
22
|
**@xylabs/set**
|
|
@@ -23,9 +25,11 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
|
|
|
23
25
|
|
|
24
26
|
## Functions
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
| Function | Description |
|
|
29
|
+
| ------ | ------ |
|
|
30
|
+
| [difference](#functions/difference) | Returns a new set containing elements in `a` that are not in `b`. |
|
|
31
|
+
| [intersection](#functions/intersection) | Returns a new set containing only elements present in both `a` and `b`. |
|
|
32
|
+
| [union](#functions/union) | Returns a new set containing all elements from both `a` and `b`. |
|
|
29
33
|
|
|
30
34
|
### functions
|
|
31
35
|
|
|
@@ -36,30 +40,23 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
|
|
|
36
40
|
***
|
|
37
41
|
|
|
38
42
|
```ts
|
|
39
|
-
function difference<TKey>(a
|
|
43
|
+
function difference<TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey>;
|
|
40
44
|
```
|
|
41
45
|
|
|
42
46
|
Returns a new set containing elements in `a` that are not in `b`.
|
|
43
47
|
|
|
44
48
|
## Type Parameters
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`TKey`
|
|
50
|
+
| Type Parameter |
|
|
51
|
+
| ------ |
|
|
52
|
+
| `TKey` |
|
|
49
53
|
|
|
50
54
|
## Parameters
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
`Set`\<`TKey`\>
|
|
55
|
-
|
|
56
|
-
The source set
|
|
57
|
-
|
|
58
|
-
### b
|
|
59
|
-
|
|
60
|
-
`Set`\<`TKey`\>
|
|
61
|
-
|
|
62
|
-
The set of elements to exclude
|
|
56
|
+
| Parameter | Type | Description |
|
|
57
|
+
| ------ | ------ | ------ |
|
|
58
|
+
| `a` | `Set`\<`TKey`\> | The source set |
|
|
59
|
+
| `b` | `Set`\<`TKey`\> | The set of elements to exclude |
|
|
63
60
|
|
|
64
61
|
## Returns
|
|
65
62
|
|
|
@@ -74,30 +71,23 @@ A new set representing the difference of `a` and `b`
|
|
|
74
71
|
***
|
|
75
72
|
|
|
76
73
|
```ts
|
|
77
|
-
function intersection<TKey>(a
|
|
74
|
+
function intersection<TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey>;
|
|
78
75
|
```
|
|
79
76
|
|
|
80
77
|
Returns a new set containing only elements present in both `a` and `b`.
|
|
81
78
|
|
|
82
79
|
## Type Parameters
|
|
83
80
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
`TKey`
|
|
81
|
+
| Type Parameter |
|
|
82
|
+
| ------ |
|
|
83
|
+
| `TKey` |
|
|
87
84
|
|
|
88
85
|
## Parameters
|
|
89
86
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
`Set`\<`TKey`\>
|
|
93
|
-
|
|
94
|
-
The first set
|
|
95
|
-
|
|
96
|
-
### b
|
|
97
|
-
|
|
98
|
-
`Set`\<`TKey`\>
|
|
99
|
-
|
|
100
|
-
The second set
|
|
87
|
+
| Parameter | Type | Description |
|
|
88
|
+
| ------ | ------ | ------ |
|
|
89
|
+
| `a` | `Set`\<`TKey`\> | The first set |
|
|
90
|
+
| `b` | `Set`\<`TKey`\> | The second set |
|
|
101
91
|
|
|
102
92
|
## Returns
|
|
103
93
|
|
|
@@ -112,30 +102,23 @@ A new set representing the intersection of `a` and `b`
|
|
|
112
102
|
***
|
|
113
103
|
|
|
114
104
|
```ts
|
|
115
|
-
function union<TKey>(a
|
|
105
|
+
function union<TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey>;
|
|
116
106
|
```
|
|
117
107
|
|
|
118
108
|
Returns a new set containing all elements from both `a` and `b`.
|
|
119
109
|
|
|
120
110
|
## Type Parameters
|
|
121
111
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
`TKey`
|
|
112
|
+
| Type Parameter |
|
|
113
|
+
| ------ |
|
|
114
|
+
| `TKey` |
|
|
125
115
|
|
|
126
116
|
## Parameters
|
|
127
117
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
`Set`\<`TKey`\>
|
|
131
|
-
|
|
132
|
-
The first set
|
|
133
|
-
|
|
134
|
-
### b
|
|
135
|
-
|
|
136
|
-
`Set`\<`TKey`\>
|
|
137
|
-
|
|
138
|
-
The second set
|
|
118
|
+
| Parameter | Type | Description |
|
|
119
|
+
| ------ | ------ | ------ |
|
|
120
|
+
| `a` | `Set`\<`TKey`\> | The first set |
|
|
121
|
+
| `b` | `Set`\<`TKey`\> | The second set |
|
|
139
122
|
|
|
140
123
|
## Returns
|
|
141
124
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/set",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.86",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"set",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"!**/*.test.*"
|
|
43
43
|
],
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@xylabs/ts-scripts-yarn3": "~7.4.
|
|
46
|
-
"@xylabs/tsconfig": "~7.4.
|
|
45
|
+
"@xylabs/ts-scripts-yarn3": "~7.4.16",
|
|
46
|
+
"@xylabs/tsconfig": "~7.4.16",
|
|
47
47
|
"typescript": "~5.9.3",
|
|
48
48
|
"vitest": "~4.0.18"
|
|
49
49
|
},
|