idempotency-store 0.1.0 → 0.1.1
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 +13 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# idempotency-store
|
|
2
|
+
|
|
3
|
+
A zero-dependency, in-memory idempotency store to prevent duplicate webhook processing.
|
|
4
|
+
|
|
5
|
+
## Why use this?
|
|
6
|
+
When payment providers (like Stripe) send a webhook, they sometimes send it more than once due to network issues. If you process the same event twice, you might charge a user twice or ship a product twice.
|
|
7
|
+
|
|
8
|
+
This package solves that by remembering the unique Event ID.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install idempotency-store
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idempotency-store",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A zero-dependency idempotency store to prevent duplicate webhook processing.",
|
|
5
|
+
"repository": "https://github.com/kanagarajdeva/idempotency-store.git",
|
|
5
6
|
"main": "index.js",
|
|
6
7
|
"types": "index.d.ts",
|
|
7
8
|
"files": [
|