Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 7 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @objectwow/join

Join objects with functionality similar to MongoDB’s $lookup
Perform a deep join of arrays of objects using UIDs.

⭐️ Your star shines on us. Star us on GitHub!
⭐️ Your star shines on us. Star us on [GitHub](https://github.com/objectwow/join)!

# Use case

Expand All @@ -26,14 +26,6 @@ const orders = [
id: 1,
code: "1",
fulfillments: [
{
id: 11,
code: "11",
products: [
{ id: 111, quantity: 1 },
{ id: 112, quantity: 4 },
],
},
{
id: 12,
code: "12",
Expand All @@ -46,7 +38,6 @@ const orders = [
const products = [
{ id: 111, name: "Product 1", price: 10 },
{ id: 112, name: "Product 2", price: 20 },
{ id: 113, name: "Product 3", price: 30 },
];

const result = await joinData({
Expand All @@ -67,14 +58,6 @@ orders = [
id: 1,
code: "1",
fulfillments: [
{
id: 11,
code: "11",
products: [
{ id: 111, name: "Product 1", price: 10, quantity: 1 },
{ id: 112, name: "Product 2", price: 20, quantity: 4 },
],
},
{
id: 12,
code: "12",
Expand Down Expand Up @@ -170,16 +153,16 @@ Of course, the tools/platforms mentioned above offer capabilities that `@objectw

| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
| ------------ | ------- | -------- | ------- | ------- | ----------------- |
| All files | 100 | 100 | 100 | 100 | |
| core.ts | 100 | 100 | 100 | 100 | |
| All files | 100 | 94.11 | 95.23 | 100 | |
| core.ts | 100 | 95.83 | 100 | 100 | 28,66 |
| error.ts | 100 | 100 | 100 | 100 | |
| singleton.ts | 100 | 100 | 100 | 100 | |
| util.ts | 100 | 100 | 100 | 100 | |
| singleton.ts | 100 | 100 | 75 | 100 | |
| util.ts | 100 | 89.47 | 100 | 100 | 24-25 |

Test Suites: 5 passed, 5 total
Tests: 64 passed, 64 total
Snapshots: 0 total
Time: 1.605 s, estimated 2 s
Time: 1.56 s, estimated 2 s

# Customization

Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@objectwow/join",
"version": "0.3.3",
"version": "0.3.4",
"license": "MIT",
"description": "Join objects with functionality similar to MongoDB's $lookup",
"description": "Perform a deep join of arrays of objects using UIDs.",
"publishConfig": {
"access": "public"
},
Expand All @@ -15,7 +15,9 @@
"object",
"join",
"@objectwow/join",
"array"
"array",
"merge",
"deep"
],
"author": "Nguyen Van Tuan",
"main": "lib/index.js",
Expand Down