Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/yornaath/batshit
Browse files Browse the repository at this point in the history
  • Loading branch information
yornaath committed Sep 11, 2023
2 parents 5521ebb + 0dd13af commit 6926bb6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021-present Tanner Linsley
Copyright (c) 2022-present Jørn Andre

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ In this example the response is an object/record with the id of the user as the
**Example:**
```json
{
1: {"username": "bob"},
2: {"username": "alice"}
"1": {"username": "bob"},
"2": {"username": "alice"}
}
```

```ts
import * as batshit from "@yornaath/batshit";

const batcher = batshit.create({
fetcher: async (ids: number[]) => {
const users: Record<number, User> = await fetchUserRecords(ids)
fetcher: async (ids: string[]) => {
const users: Record<string, User> = await fetchUserRecords(ids)
return users
},
resolver: batshit.indexedResolver(),
Expand Down
1 change: 1 addition & 0 deletions packages/batshit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"name": "Jørn Andre",
"url": "https://github.com/yornaath/batshit"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
Expand Down
1 change: 1 addition & 0 deletions packages/devtools-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"name": "Jørn Andre",
"url": "https://github.com/yornaath"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
Expand Down
1 change: 1 addition & 0 deletions packages/devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"name": "Jørn Andre",
"url": "https://github.com/yornaath/batshit"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
Expand Down

0 comments on commit 6926bb6

Please sign in to comment.