You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
fix README
This commit is contained in:
@@ -192,7 +192,7 @@ You can override the default options by providing a configuration object:
|
|||||||
client.scanIterator({
|
client.scanIterator({
|
||||||
TYPE: 'string', // `SCAN` only
|
TYPE: 'string', // `SCAN` only
|
||||||
MATCH: 'patter*',
|
MATCH: 'patter*',
|
||||||
COUNT: 100,
|
COUNT: 100
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -201,8 +201,7 @@ client.scanIterator({
|
|||||||
Define new functions using [Lua scripts](https://redis.io/commands/eval) which execute on the Redis server:
|
Define new functions using [Lua scripts](https://redis.io/commands/eval) which execute on the Redis server:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { createClient } from 'redis';
|
import { createClient, defineScript } from 'redis';
|
||||||
import { defineScript } from 'redis/lua-script';
|
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const client = createClient({
|
const client = createClient({
|
||||||
|
2
index.ts
2
index.ts
@@ -6,3 +6,5 @@ export const createClient = RedisClient.create;
|
|||||||
export const commandOptions = RedisClient.commandOptions;
|
export const commandOptions = RedisClient.commandOptions;
|
||||||
|
|
||||||
export const createCluster = RedisCluster.create;
|
export const createCluster = RedisCluster.create;
|
||||||
|
|
||||||
|
export { defineScript } from './lib/lua-script';
|
||||||
|
Reference in New Issue
Block a user