11# @objectwow/join
22
3- Join objects with functionality similar to MongoDB’s $lookup
3+ Perform a deep join of arrays of objects using UIDs.
44
5- ⭐️ Your star shines on us. Star us on GitHub!
5+ ⭐️ Your star shines on us. Star us on [ GitHub] ( https://github.com/objectwow/join ) !
66
77# Use case
88
@@ -26,14 +26,6 @@ const orders = [
2626 id: 1 ,
2727 code: " 1" ,
2828 fulfillments: [
29- {
30- id: 11 ,
31- code: " 11" ,
32- products: [
33- { id: 111 , quantity: 1 },
34- { id: 112 , quantity: 4 },
35- ],
36- },
3729 {
3830 id: 12 ,
3931 code: " 12" ,
@@ -46,7 +38,6 @@ const orders = [
4638const products = [
4739 { id: 111 , name: " Product 1" , price: 10 },
4840 { id: 112 , name: " Product 2" , price: 20 },
49- { id: 113 , name: " Product 3" , price: 30 },
5041];
5142
5243const result = await joinData ({
@@ -67,14 +58,6 @@ orders = [
6758 id: 1 ,
6859 code: " 1" ,
6960 fulfillments: [
70- {
71- id: 11 ,
72- code: " 11" ,
73- products: [
74- { id: 111 , name: " Product 1" , price: 10 , quantity: 1 },
75- { id: 112 , name: " Product 2" , price: 20 , quantity: 4 },
76- ],
77- },
7861 {
7962 id: 12 ,
8063 code: " 12" ,
@@ -170,16 +153,16 @@ Of course, the tools/platforms mentioned above offer capabilities that `@objectw
170153
171154| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
172155| ------------ | ------- | -------- | ------- | ------- | ----------------- |
173- | All files | 100 | 100 | 100 | 100 | |
174- | core.ts | 100 | 100 | 100 | 100 | |
156+ | All files | 100 | 94.11 | 95.23 | 100 | |
157+ | core.ts | 100 | 95.83 | 100 | 100 | 28,66 |
175158| error.ts | 100 | 100 | 100 | 100 | |
176- | singleton.ts | 100 | 100 | 100 | 100 | |
177- | util.ts | 100 | 100 | 100 | 100 | |
159+ | singleton.ts | 100 | 100 | 75 | 100 | |
160+ | util.ts | 100 | 89.47 | 100 | 100 | 24-25 |
178161
179162Test Suites: 5 passed, 5 total
180163Tests: 64 passed, 64 total
181164Snapshots: 0 total
182- Time: 1.605 s, estimated 2 s
165+ Time: 1.56 s, estimated 2 s
183166
184167# Customization
185168
0 commit comments