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

catbox-redis

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

catbox-redis - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

11

lib/index.js

@@ -199,3 +199,12 @@

return encodeURIComponent(this.settings.partition) + ':' + encodeURIComponent(key.segment) + ':' + encodeURIComponent(key.id);
const parts = [];
if (this.settings.partition) {
parts.push(encodeURIComponent(this.settings.partition));
}
parts.push(encodeURIComponent(key.segment));
parts.push(encodeURIComponent(key.id));
return parts.join(':');
};

2

package.json
{
"name": "catbox-redis",
"description": "Redis adapter for catbox",
"version": "1.0.9",
"version": "1.1.0",
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)",

@@ -6,0 +6,0 @@ "contributors": [

@@ -916,2 +916,37 @@

describe('generateKey()', () => {
it('generates the storage key from a given catbox key', (done) => {
const options = {
partition: 'foo'
};
const redis = new Redis(options);
const key = {
id: 'bar',
segment: 'baz'
};
expect(redis.generateKey(key)).to.equal('foo:baz:bar');
done();
});
it('generates the storage key from a given catbox key without partition', (done) => {
const options = {};
const redis = new Redis(options);
const key = {
id: 'bar',
segment: 'baz'
};
expect(redis.generateKey(key)).to.equal('baz:bar');
done();
});
});
describe('stop()', () => {

@@ -918,0 +953,0 @@

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