@cslug/redis 0.1.0 → 0.3.0

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/redis.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cslug/redis",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Redis connections and Redis drivers for cache, locks, rate limits and sessions.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,6 +28,6 @@
28
28
  "bun": ">=1.3.14"
29
29
  },
30
30
  "peerDependencies": {
31
- "@cslug/core": "0.1.0"
31
+ "@cslug/core": "0.3.0"
32
32
  }
33
33
  }
package/src/redis.ts CHANGED
@@ -115,6 +115,7 @@ export const encode = (value: unknown): string =>
115
115
  return v
116
116
  })
117
117
 
118
+ /** Reverse of `encode()`: restores bigint and Date values; undefined for a missing key. */
118
119
  export const decode = <T>(text: string | null | undefined): T | undefined =>
119
120
  text === null || text === undefined
120
121
  ? undefined