Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ioredis

Package Overview
Dependencies
Maintainers
2
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ioredis - npm Package Compare versions

Comparing version 5.0.5 to 5.0.6

3

built/Pipeline.d.ts

@@ -29,1 +29,4 @@ import Redis from "./Redis";

export default Pipeline;
interface Pipeline {
length: number;
}

2

package.json
{
"name": "ioredis",
"version": "5.0.5",
"version": "5.0.6",
"description": "A robust, performance-focused and full-featured Redis client for Node.js.",

@@ -5,0 +5,0 @@ "main": "./built/index.js",

@@ -105,3 +105,3 @@ [![ioredis](https://cdn.jsdelivr.net/gh/luin/ioredis@b5e8c74/logo.svg)](https://github.com/luin/ioredis)

```shell
$ npm install ioredis
npm install ioredis
```

@@ -112,3 +112,3 @@

```shell
$ npm install --save-dev @types/node
npm install --save-dev @types/node
```

@@ -317,17 +317,25 @@

Arguments can be buffers:
Binary data support is out of the box. Pass buffers to send binary data:
```javascript
redis.set("foo", Buffer.from("bar"));
redis.set("foo", Buffer.from([0x62, 0x75, 0x66]));
```
And every command has a method that returns a Buffer (by adding a suffix of "Buffer" to the command name).
To get a buffer instead of a utf8 string:
Every command that returns a [bulk string](https://redis.io/docs/reference/protocol-spec/#resp-bulk-strings)
has a variant command with a `Buffer` suffix. The variant command returns a buffer instead of a UTF-8 string:
```javascript
redis.getBuffer("foo", (err, result) => {
// result is a buffer.
});
const result = await redis.getBuffer("foo");
// result is `<Buffer 62 75 66>`
```
It's worth noticing that you don't need the `Buffer` suffix variant in order to **send** binary data. That means
in most case you should just use `redis.set()` instead of `redis.setBuffer()` unless you want to get the old value
with the `GET` parameter:
```javascript
const result = await redis.setBuffer("foo", "new value", "GET");
// result is `<Buffer 62 75 66>` as `GET` indicates returning the old value.
```
## Pipelining

@@ -1394,3 +1402,3 @@

```shell
$ npm test
npm test
```

@@ -1397,0 +1405,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc